db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-811) Creating trace files in derbytclient fails when running with a SecurityManager
Date Thu, 08 Feb 2007 22:21:05 GMT

     [ https://issues.apache.org/jira/browse/DERBY-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Mamta A. Satoor updated DERBY-811:

    Attachment: DERBY811_RunCheckDriverWithSecurityManager_diff_v01.txt

Thanks, Andrew. I was able to run the test with SecurityManager after removing the noSecurityManager=true
from checkDriver_app.properties. 

I ran checkDriver test with the Derby jar files under DerbyNetClient framework after the fix
for DERBY-1275 was committed and there was no security related exceptions. I have attached
the patch DERBY811_RunCheckDriverWithSecurityManager_diff_v01.txt which removes noSecurityManager=true
from checkDriver_app.properties. If there are no objections to this change, then I will commit
it sometime tomorrow.

As for the ClientBaseDataSource.computePrintWriter using hard coded "/" rather than File.separator,
I will make that change next and post another patch after running some basic tests.

> Creating trace files in derbytclient fails when running with a SecurityManager
> ------------------------------------------------------------------------------
>                 Key: DERBY-811
>                 URL: https://issues.apache.org/jira/browse/DERBY-811
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client, Security
>    Affects Versions:,
>            Reporter: Daniel John Debrunner
>         Assigned To: Mamta A. Satoor
>            Priority: Minor
>         Attachments: DERBY811_RunCheckDriverWithSecurityManager_diff_v01.txt
> Can be seen by running the test jdbcapi/checkDriver.java in the DerbyNetClient framework.
> Another bug in the code is in ClientBaseDataSource.computePrintWriter  where the file
separator is hard coded as "/".
> java.security.AccessControlException: access denied (java.io.FilePermission C:\_work\svn_clean2\trunk\systest\out2\DerbyNetClient\checkDriver\trace.out
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:292)
>         at java.security.AccessController.checkPermission(AccessController.java:476)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:538)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:968)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:191)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:124)
>         at org.apache.derby.client.am.LogWriter.getPrintWriter(LogWriter.java:1190)
>         at org.apache.derby.jdbc.ClientBaseDataSource.computePrintWriter(ClientBaseDataSource.java:587)
>         at org.apache.derby.jdbc.ClientBaseDataSource.computeDncLogWriter(ClientBaseDataSource.java:528)
>         at org.apache.derby.jdbc.ClientBaseDataSource.computeDncLogWriterForNewConnection(ClientBaseDataSource.java:512)
>         at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:116)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDriver.testConnect(checkDriver.java:397)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDriver.testClientAttributes(checkDriver.java:177)
>         at org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDriver.main(checkDriver.java:133)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message