harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Qiu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3568) [classlib][security] Throw AccessControlException when read a file in another direcorty which has been granted read permission in policy file
Date Wed, 04 Apr 2007 06:28:32 GMT
[classlib][security] Throw AccessControlException when read a file in another direcorty which
has been granted read permission in policy file
---------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-3568
                 URL: https://issues.apache.org/jira/browse/HARMONY-3568
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP
            Reporter: Sean Qiu


test.policy grant the source code of testSecurity.class the permission of read the ../file/test.txt.
RI can finish the code successfully, while harmony will throw :

Exception in thread "main" java.security.AccessControlException: Access denied (java.io.FilePermissi
on ..\file\test.txt read)
        at java.security.AccessController.checkPermission(AccessController.java:94)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:746)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:398)
        at java.io.FileInputStream.<init>(FileInputStream.java:72)
        at java.io.FileInputStream.<init>(FileInputStream.java:123)
        at testSecurity.main(testSecurity.java:9)

Files in the zip:
src/testSecurity.class
    /test.policy

file/test.txt

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


Mime
View raw message