[Mono-list] System.Security

Miguel de Icaza miguel@ximian.com
31 Dec 2001 15:30:47 -0500


> For implementing System.Security.SecurityManger.IsGranted(Ipermission):
> How does one obtain the permissions granted to the calling code
> assembly?  The docs indicate that the runtime grants permissions based
> on policy and on any declarative security requests (required, optional,
> refused). So, I am assuming there must be a window into the runtime
> (some API) where we can get this info.

The function that computes this information should probably have various
bits of information at hand to compute this.

The information you need from the runtime probably will require the
runtime to compute the permissions available based on a stack trace: who
is the original caller and you reduce the set of permissions as you go.

I do have some slides from the PDC in my machine in Boston (wont be back
there until the 13th) that explain the way the MS implementation works,
which should be helpful in implementing this. 

Miguel.