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:
committed by
Mark Wielaard
parent
68629d160e
commit
59c86e4b88
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user