harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-6415) [classlib][Security] policy file content parcing is different from RI
Date Wed, 06 Jan 2010 02:33:54 GMT

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

Regis Xu resolved HARMONY-6415.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M13

Thanks Mohan!

Patch was applied at r896308, please verify.

> [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
>            Assignee: Regis Xu
>             Fix For: 5.0M13
>
>         Attachments: HARMONY-6415_Security_policy_parcing_difference.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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]
> [1] 
> 	permission permission_class_name ["target_name"] [, "action_list"] [, signedby "name1,...,nameN"]
> [2] 
> policyTest.txt:
> ==========
> 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.


Mime
View raw message