[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/24364] Stackoverflow in SecurityManager.checkPackageAcces
From: |
csm at gnu dot org |
Subject: |
[Bug classpath/24364] Stackoverflow in SecurityManager.checkPackageAccess |
Date: |
18 Oct 2005 05:26:32 -0000 |
------- Comment #1 from csm at gnu dot org 2005-10-18 05:26 -------
The 'TestSecurityManager' class from Mauve looks suspicious, here. It should,
for any Permission that isn't a 'LoggingPermission,' make a call to
'super.checkPermission.' AccessController (the guts of checkPermission) has
checks that short-circuit this kind of recursion.
Although, this could also be a fault of the VM, in a way, in that a basic class
(Permisson) isn't loaded before a security manager is installed. Though, I
suppose relying on AccessController's semantics is easier to do than resolving
all the possible boostrap dependencies...
Anyway, I think 'TestSecurityManager.checkPermission' should do this:
public void checkPermission(Permission perm)
{
if (perm instanceof LoggingPermission)
{
if (controlPermission.implies(perm) && !grantLogging)
throw new AccessControlException("access denied", perm);
}
else
super.checkPermission (perm);
}
Not tested, however.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24364