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. From-SVN: r88127
This commit is contained in:
parent
68629d160e
commit
59c86e4b88
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user