[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Access control contexts (silly idea)
From: |
Mark Wielaard |
Subject: |
Re: Access control contexts (silly idea) |
Date: |
Fri, 12 Mar 2004 14:50:18 +0100 |
Hi,
On Tue, 2004-02-10 at 20:18, Casey Marshall wrote:
> I was looking into ways to implement the AccessController.getContext
> method, and devised a way to do it without dipping into native
> methods. In short, it uses the getStackTrace method of Throwable to
> obtain the current stack, fetches each Class named in the stack, then
> gets the ProtectionDomain for that Class.
>
> This is a kludge, and I would not be surprised that certain conditions
> cause this to fail.
The idea is fun, but since you cannot get at the ClassLoader of the
Class it just doesn't work. (Except for classes loaded through the
application/system and/or bootstrap classloader which isn't that
interesting.) But you did fill in almost all of the logic that we were
missing. Thanks!
I just saw that Stephen Crawley posted a patch for a real
VMAccessController entry point. Combining that with your fixes should
give us everything needed.
https://savannah.gnu.org/patch/index.php?func=detailitem&item_id=2788
Cheers,
Mark
P.S. Sorry for not replying earlier. Some of this could have gone in for
0.08, but I don't want to change to much just before the release.
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Access control contexts (silly idea),
Mark Wielaard <=