Can an Assembly INCREASE the permissions granted to it at run-time.
From: Novice (6tc1_at_qlink.queensu.ca)
Date: 03/23/04
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Windows Auth -- double hop issue??"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Can an Assembly INCREASE the permissions granted to it at run-time."
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Can an Assembly INCREASE the permissions granted to it at run-time."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 23 Mar 2004 13:51:44 -0800
I have been reading about .NET security off and on for about a month
now and I'm a bit confused by this excerpt from one document I was
reading.
The document concerns the grant set that is given to an assembly when
it is loaded by the CLR. The statement is:
The code itself can use a permission request to influence the
permissions that are granted.
I can understand how the code could DECREASE the permission set that
is granted to it (through the use of imperative or declarative
security checks), but I have no idea how code could request increased
permissions.
For example, I have a test application that writes a blank file to a
directory (c:\temp) on my machine. If I give that assembly full trust
it will
write the file to my directory even if it is being accessed over the
internet. However, if I don't "trust" the assembly, it will not be
able to write the file to that directory. And I don't know of anyway
that I could code the assembly such that it could request additional
permissions at run-time. If this were possible I would imagine it
would take the form of the user being presented with a dialog box that
says something like:
Currently this application does not have permission to write to
"c:\temp" - do you wish to give this applicatin that permission?
Is there a way to do this?
Thanks,
Novice
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Windows Auth -- double hop issue??"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Can an Assembly INCREASE the permissions granted to it at run-time."
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Can an Assembly INCREASE the permissions granted to it at run-time."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|