diff options
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/security/VMAccessController.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libjava/java/security/VMAccessController.java b/libjava/java/security/VMAccessController.java index 8436c9ccb60..d214e1926d0 100644 --- a/libjava/java/security/VMAccessController.java +++ b/libjava/java/security/VMAccessController.java @@ -56,7 +56,7 @@ final class VMAccessController Permissions permissions = new Permissions(); permissions.add(new AllPermission()); ProtectionDomain[] domain = new ProtectionDomain[] { - new ProtectionDomain(source, permissions) + new ProtectionDomain(source, permissions, null, null) }; DEFAULT_CONTEXT = new AccessControlContext(domain); } @@ -121,7 +121,7 @@ final class VMAccessController LinkedList stack = state.getContexts(); if (!stack.isEmpty()) { - stack.removeFirst(); + stack.removeFirst(); } else if (DEBUG) { @@ -178,26 +178,27 @@ final class VMAccessController for (int i = 3; i < classes.length; i++) { Class clazz = classes[i]; + ClassLoader loader = clazz.getClassLoader(); if (DEBUG) { debug("checking " + clazz); // subject to getClassLoader RuntimePermission - debug("loader = " + clazz.getClassLoader()); + debug("loader = " + loader); } if (privileged && i == classes.length - 2) { // If there was a call to doPrivileged with a supplied context, - // return that context. If using JAAS doAs*, it should be - // a context with a SubjectDomainCombiner + // return that context. If using JAAS doAs*, it should be + // a context with a SubjectDomainCombiner LinkedList l = state.getContexts(); if (!l.isEmpty()) context = (AccessControlContext) l.getFirst(); } // subject to getProtectionDomain RuntimePermission - ProtectionDomain domain = clazz.getProtectionDomain(); + ProtectionDomain domain = clazz.getProtectionDomain(); if (domain == null) continue; @@ -208,7 +209,8 @@ final class VMAccessController // Create a static snapshot of this domain, which may change over time // if the current policy changes. domains.add(new ProtectionDomain(domain.getCodeSource(), - domain.getPermissions())); + domain.getPermissions(), + loader, null)); } if (DEBUG) |