You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <de...@db.apache.org> on 2006/10/10 15:15:19 UTC

[jira] Created: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
----------------------------------------------------------------------------------

                 Key: DERBY-1951
                 URL: http://issues.apache.org/jira/browse/DERBY-1951
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.3.0.0
            Reporter: Kristian Waagan
         Assigned To: Kristian Waagan


When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:

1) AllPackagesjava.security.AccessControlException: access denied
(java.io.FilePermission /some/pathserverConsoleOutput.log write)
       at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
       at java.security.AccessController.checkPermission(AccessController.java:401)
       at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
       at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
       at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
)
       at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
       at junit.extensions.TestSetup.run(TestSetup.java:23)
       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
       at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
       at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1951?page=all ]

Kristian Waagan updated DERBY-1951:
-----------------------------------

    Derby Info: [Patch Available]

> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>         Attachments: derby-1951-1a.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1951?page=all ]

Kristian Waagan updated DERBY-1951:
-----------------------------------

    Attachment: derby-1951-1b.diff

You are right Bryan.

Sorry, I must have been writing way too many shell scripts lately...

'derby-1951-1b.diff' replaces revision a, incorporating the suggestion Bryan made.
Patch ready for more review, or a commit.

> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>         Attachments: derby-1951-1a.diff, derby-1951-1b.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Bryan Pendleton (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1951?page=comments#action_12441247 ] 
            
Bryan Pendleton commented on DERBY-1951:
----------------------------------------

Looks great, thanks!

What test can I run in my environment to observe the effects of your change?

> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>         Attachments: derby-1951-1a.diff, derby-1951-1b.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1951?page=comments#action_12442951 ] 
            
Kristian Waagan commented on DERBY-1951:
----------------------------------------

Anybody planning to commit or further review this?
Although the issue is simple to work around, the patch is also simple and would be convenient to get in.

> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>         Attachments: derby-1951-1a.diff, derby-1951-1b.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1951?page=all ]

Kristian Waagan updated DERBY-1951:
-----------------------------------

    Attachment: derby-1951-1a.diff

'derby-1951-1a.diff' fixes a bug that can be seend depending on the specification of 'derby.system.home'. If it does not end with a file separator, which is the case if specifed as 'pwd' on Unix system, an invalid path is constructed for the server log file.

Note that after this patch is applied, other errors and failurs will emerge when running the 'All' JUnit suite (Tests run: 1760,  Failures: 4,  Errors: 3).

Patch is ready for review/commit. I have made the insertion of the file separator unconditional, in the belief that  multiple file separators will be handled by the JVM/OS. This can easily be changed if required.

> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>         Attachments: derby-1951-1a.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Bryan Pendleton (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1951?page=comments#action_12441211 ] 
            
Bryan Pendleton commented on DERBY-1951:
----------------------------------------

Your patch seems reasonable to me. If it were me, I would probably write the additional lines
of code to omit the "extra" separator, something like:

  String fileName = System.getProperty("derby.system.home");
  if (!fileName.endsWith(FILESEPARATOR))
      fileName = fileName + FILESEPARATOR;
  fileName = fileName + "serverConsoleOutput.log";

The reason I would do this is that it doesn't seem like that much more code, and it avoids
the possibility that somebody down the road in the future will be crawling through things
and see something like /home/bpendleton/derby//serverConsoleOutput.log and think,
even if just for a second, that "something is missing between 'derby' and 'serverConsoleOutput.log'".

Writing the extra code to avoid this now seems like it might save people time in the
future by making the fileName string self-evidently correct.


> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>         Attachments: derby-1951-1a.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1951?page=all ]

Kristian Waagan closed DERBY-1951.
----------------------------------


> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>             Fix For: 10.3.0.0
>
>         Attachments: derby-1951-1a.diff, derby-1951-1b.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1951?page=comments#action_12441260 ] 
            
Kristian Waagan commented on DERBY-1951:
----------------------------------------

See the mail thread for DERBY-1845. You need to run a test using the NetworkServerTestSetup-decorator. I don't know which tests use it, but if you run suites.All directly with JUnit, you should see the effect.

> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>         Attachments: derby-1951-1a.diff, derby-1951-1b.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1951) Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1951?page=all ]

Kristian Waagan resolved DERBY-1951.
------------------------------------

    Fix Version/s: 10.3.0.0
       Resolution: Invalid
       Derby Info:   (was: [Patch Available])

This problem no longer exists. The code was changed in revision 464785 by DERBY-1952.

> Missing directory separator in path construction in 'NetworkServerTestSetup.setUp'
> ----------------------------------------------------------------------------------
>
>                 Key: DERBY-1951
>                 URL: http://issues.apache.org/jira/browse/DERBY-1951
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>             Fix For: 10.3.0.0
>
>         Attachments: derby-1951-1a.diff, derby-1951-1b.diff
>
>
> When constructing the path for the server output file, the directory separator (typically '/') is omitted, causing a security violation when running under the security manager. Here's a sample stack trace for a JUnit run:
> 1) AllPackagesjava.security.AccessControlException: access denied
> (java.io.FilePermission /some/pathserverConsoleOutput.log write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>        at java.security.AccessController.checkPermission(AccessController.java:401)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup$1.run(NetworkServerTestSetup.java:72
> )
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:65
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira