classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SecurityManager troubles


From: Gary Benson
Subject: Re: SecurityManager troubles
Date: Thu, 12 Jan 2006 11:22:36 +0000

Archie Cobbs wrote:
> Having said that, still not sure what the solution is. Seems likely
> that any class used as a security manager needs to be fully resolved
> before being used. Perhaps System.setSecurityManager(s) can always
> invoke Class.forName(s.getClass().getName, true,
> s.getClass().getClassLoader()).

I just tried this, but it didn't fix the problem in Mauve, at least on
JamVM.

> Right now I can't remember if class initialization implies
> (complete) class resolution. I think it does.. but if not then the
> above trick wouldn't necessarily work. Clearly it does NOT in kaffe,
> otherwise the above example couldn't happen.
> 
> Hmm, maybe System.setSecurityManager() can do a "phony" invocation
> of s.checkPermission() to ensure that it's resolved...

That's what I did initially in Mauve.  The problem is that it
requires you to insert some logic into checkPermission() to
stop it from calling itself or to stop it dying if it does.

Cheers,
Gary




reply via email to

[Prev in Thread] Current Thread [Next in Thread]