2004-09-26 Casey Marshall <csm@gnu.org>
authorCasey Marshall <csm@gnu.org>
Sun, 26 Sep 2004 14:47:41 +0000 (14:47 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Sun, 26 Sep 2004 14:47:41 +0000 (14:47 +0000)
       * java/security/ProtectionDomain.java
       (<init>(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

libjava/ChangeLog
libjava/java/security/ProtectionDomain.java
libjava/java/security/SecureClassLoader.java

index 4e1c6879907555aeff54b52e6c2b5b36d0b5672d..b2c70bcf158ef657a8de3ca1a1c13e1f62e7311a 100644 (file)
@@ -1,3 +1,14 @@
+2004-09-26  Casey Marshall <csm@gnu.org>
+
+       * java/security/ProtectionDomain.java
+       (<init>(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  <mark@klomp.org>
 
        * Makefile.am (core_java_source_files): Add VMTimeZone.java.
index a6db9cd8eac4531e506e6c6ad69e93d60681458d..d0768b3a4376c951c882df1d221eae54cd0da69d 100644 (file)
@@ -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);
   }
 
   /**
index 1f67a33dc2c0650dda209f757faa986808d84c0c..7546edc85e5f55f5a07436a73cbe4193633918b9 100644 (file)
@@ -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);
   }
 }