By adding the following permissions to jinitest.policy the test passes on jdk1.6, this combined with the earlier changes to PreferredClassProvider to lazily load two system properties at Object runtime rather than with class static initializer blocks.
grant {
permission java.security.SecurityPermission "getProperty.net.jini.security.policy.PolicyFileProvider.basePolicyClass";
   permission java.util.PropertyPermission "java.security.policy", "read";
   permission java.util.PropertyPermission "java.security.policy", "write";
permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider";
   permission java.lang.RuntimePermission "getProtectionDomain";
permission net.jini.security.GrantPermission "java.security.AllPermission \"\", \"\"";
};

This test passes on jdk1.5 without the above modifications.

It appears to me that the SecurityManager has been loaded and it is using the standard sun Policy implementation until the PolicyFileProvider loads, the grant: permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider"; is used by the DynamicPolicyProvider (Service Provider Interface - SPI) during it's construction. The PolicyFileProvider is constructed first and passed into the constructor of DynamicPolicyProvider.

Cheers,

Peter.

Peter Firmstone wrote:
Well, the bug is jvm dependent, I forgot I had JAVA_HOME set to jdk1.5 on the command line. It passes on jdk1.5 and fails on jdk1.6.

This appears to have something to do with the point in time the SecurityManager is loaded. It appears to be loaded earlier in jdk1.6

I think I'm close to cracking it.

I tidied up the searchPath to include the src directory for the policy files, so I don't have to recompile the whole qa suite every time I modify a policy file!

When I get this to pass I'll commit the code.

Cheers,

Peter.


Peter Firmstone wrote:
Sim IJskes - QCG wrote:
Peter Firmstone wrote:
Yep too good to be true, it's behaving funky again.


Is it easy to reproduce with one or 2 VM's running? Do you maybe have the commandlines of the VM's for us?

Gr. Sim


Just modify the source and target to = 5 for Java 5 in both the ant build scripts, I'm running it on an Ultra 80 with Quad Processors, then build as usual and execute ant qa.run.

Cheers,

Peter.




Reply via email to