harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohanraj Loganathan (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6415) [classlib][Security] policy file content parcing is different from RI
Date Tue, 05 Jan 2010 16:44:58 GMT
[classlib][Security] policy file content parcing is different from RI

                 Key: HARMONY-6415
                 URL: https://issues.apache.org/jira/browse/HARMONY-6415
             Project: Harmony
          Issue Type: Bug
          Components: Non-bug differences from RI
    Affects Versions: 5.0M12
         Environment: All platforms
            Reporter: Mohanraj Loganathan

Please consider the following testmethod:

    public void test_policyFileEntry_contains_Quotes1() throws Exception{
        System.setProperty("java.security.policy", "resources/policyTest2.txt");
        AccessController.checkPermission(new RuntimePermission("setSecurityManager"));

Above test passes with RI. HDK throws AccessControlException. HDK not able to parse the Policy
file if the particular entries permission_class_name enclosed with quotes. But as per javadoc,
policy file entry must be the following [1]. But RI allows the quotes for permission_class_name.
Please find the sample policy file entry here [2]

	permission permission_class_name ["target_name"] [, "action_list"] [, signedby "name1,...,nameN"]

grant {
        permission java.util.PropertyPermission "user.dir", "read";
        permission java.lang.RuntimePermission "createClassLoader";
        permission java.io.FilePermission "<<ALL FILES>>", "delete";
        permission java.io.FilePermission "<<ALL FILES>>", "read";
        permission "java.util.PropertyPermission" "java.security.policy", "write";
        permission "java.lang.RuntimePermission" "setSecurityManager";
        permission "java.util.PropertyPermission" "java.security.policy", "read";
        permission "java.lang.RuntimePermission" "setIO";

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

View raw message