harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (HARMONY-2910) [classlib][security] Harmony cannot identify 'codeBase' feature in policy file
Date Wed, 24 Oct 2007 14:18:51 GMT

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

Tim Ellison reopened HARMONY-2910:
----------------------------------


It would appear that there are two assertions in the new tests accompanying this issue that
pass on Windows but fail on Linux.  I checked and these are not regressions since (i.e. they
also fail on) r587894 Linux.

I have temporarily disabled the tests until we figure out the tests are valid, and then fix
the bug.

see:
 http://svn.apache.org/viewvc?view=rev&revision=587894

> [classlib][security] Harmony cannot identify 'codeBase' feature in policy file
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-2910
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2910
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ruth Cao
>            Assignee: Tim Ellison
>         Attachments: H-2910_upd.patch, Harmony-2910-2.zip, Harmony-2910-Fix.patch, Harmony-2910-Fix.patch,
Harmony-2910-fix.patch, Harmony-2910-PolicyEntryTest.patch, Harmony-2910-PolicyTest.patch,
Harmony-2910-Test.patch, Harmony-2910-Test.patch, Harmony-2910.diff, Harmony-2910.diff, Harmony-2910.diff,
regressionTest2910.txt
>
>
> create a simple policy file and then run PolicyTest  with the argument and the policy
file[1] as following on Windows XP:
> -Dtest.bin.dir=c:\api\ -Djava.security.policy=<policy file path>
> public class PolicyTest {	
> 	public static void main(String[] args) throws Exception {
> 		Policy p = Policy.getPolicy();
> 		ProtectionDomain pd = new ProtectionDomain(new CodeSource(new URL(
> 				"file:/c:/api/*"), (java.security.cert.Certificate[]) null), null);
> 		PermissionCollection pCollection = p.getPermissions(pd);
> 		Enumeration<Permission> elements = pCollection.elements();
> 		while (elements.hasMoreElements()) {
> 			if(elements.nextElement().equals(new AllPermission())){
> 				System.out.println("contains AllPermission");
> 			}
> 		}
> 	}
> }
> RI prints:
> contains AllPermission
> while Harmony prints nothing.
> [1]
> grant codeBase "file:${test.bin.dir}/-" {
>    permission java.security.AllPermission; 
> }; 

-- 
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