Bug 46775

Summary: [Classpath] Calling Policy.setPolicy with a new Policy object has no effect on the DefaultSecurityManager
Product: classpath Reporter: Andrew John Hughes <gnu_andrew>
Component: classpathAssignee: Andrew John Hughes <gnu_andrew>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 0.98   
Target Milestone: 0.99   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2010-12-03 00:40:43
Bug Depends on:    
Bug Blocks: 46773    

Description Andrew John Hughes 2010-12-03 00:36:56 UTC
VMAccessController needs to use the four argument constructor of ProtectionDomain to ensure that the current Policy is consulted by the default SecurityManager implementation.

See PR46773 for more information.
Comment 1 Andrew John Hughes 2010-12-03 00:37:13 UTC
Add metabug.
Comment 2 Andrew John Hughes 2010-12-03 11:37:20 UTC
http://lists.gnu.org/archive/html/commit-classpath/2010-12/msg00000.html

CVSROOT:        /sources/classpath
Module name:    classpath
Changes by:     Andrew John Hughes <gnu_andrew> 10/12/03 01:02:05

Modified files:
        .              : ChangeLog 
        vm/reference/java/security: VMAccessController.java 

Log message:
        PR46775: Ensure use of setPolicy is reflected by the default 
SecurityManager.
        
        2010-12-02  Andrew John Hughes  <address@hidden>
        
                PR classpath/46775
                * vm/reference/java/security/VMAccessController.java:
                (DEFAULT_CONTEXT): Create ProtectionDomain with
                four argument constructor (arguments are the same
                as those implied by the two argument constructor).
                (getContext()): Create ProtectionDomain instances
                with four argument constructor using a null Principal
                array (as before) but including the classloader, which
                was always null before.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9804&r2=1.9805
http://cvs.savannah.gnu.org/viewcvs/classpath/vm/reference/java/security/VMAccessController.java?cvsroot=classpath&r1=1.8&r2=1.9