From: Casey Marshall Date: Sun, 26 Sep 2004 14:47:41 +0000 (+0000) Subject: 2004-09-26 Casey Marshall X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59c86e4b881c1d1c2e21424ae867c315ee713830;p=gcc.git 2004-09-26 Casey Marshall * java/security/ProtectionDomain.java ((CodeSource,PermissionCollection)): set `staticBinding' to `true'. * java/security/SecureClassLoader.java (defineClass): make protection domain dynamically bound. (getPermissions): call `getCurrentPolicy' to avoid permission check. From-SVN: r88127 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 4e1c6879907..b2c70bcf158 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,14 @@ +2004-09-26 Casey Marshall + + * java/security/ProtectionDomain.java + ((CodeSource,PermissionCollection)): set `staticBinding' to + `true'. + + * java/security/SecureClassLoader.java + (defineClass): make protection domain dynamically bound. + (getPermissions): call `getCurrentPolicy' to avoid permission + check. + 2004-09-25 Mark Wielaard * Makefile.am (core_java_source_files): Add VMTimeZone.java. diff --git a/libjava/java/security/ProtectionDomain.java b/libjava/java/security/ProtectionDomain.java index a6db9cd8eac..d0768b3a437 100644 --- a/libjava/java/security/ProtectionDomain.java +++ b/libjava/java/security/ProtectionDomain.java @@ -83,7 +83,7 @@ public class ProtectionDomain */ public ProtectionDomain(CodeSource codesource, PermissionCollection permissions) { - this(codesource, permissions, null, null, false); + this(codesource, permissions, null, null, true); } /** diff --git a/libjava/java/security/SecureClassLoader.java b/libjava/java/security/SecureClassLoader.java index 1f67a33dc2c..7546edc85e5 100644 --- a/libjava/java/security/SecureClassLoader.java +++ b/libjava/java/security/SecureClassLoader.java @@ -84,7 +84,7 @@ public class SecureClassLoader extends ClassLoader if (cs != null) { ProtectionDomain protectionDomain - = new ProtectionDomain(cs, getPermissions(cs)); + = new ProtectionDomain(cs, getPermissions(cs), this, null); return super.defineClass(name, b, off, len, protectionDomain); } else @@ -102,7 +102,7 @@ public class SecureClassLoader extends ClassLoader */ protected PermissionCollection getPermissions(CodeSource cs) { - Policy policy = Policy.getPolicy(); + Policy policy = Policy.getCurrentPolicy(); return policy.getPermissions(cs); } }