Re: Use of Unrestricted flag ???
- From: "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com>
- Date: Thu, 27 Jul 2006 15:24:00 -0400
"serge calderara" <sergecalderara@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:06745F79-0C7F-4296-A233-7ED484A12A5B@xxxxxxxxxxxxxxxx
SOunds not so logic for me.
If we aply to an asembly a security permission that means that we would like
forcely to restrict from one way or an other.
Not always. For example, sometimes assembly-level permission attributes are used to communicate security information to machine administrators.
So why using that Unrestricted
flag then, why not simply skip it all if we want to restrict or simply remove
the assembly permission IO attribute if we want UNrestricted no ?
RestrictOptional has the additional property of implicitly rejecting all other permissions, so the attribute you gave as an example has more consequences than you seem to think.
Also, in the particular case of FileIOPermission, choosing an assembly-level permission attribute can be tricky since the path(s) the application needs to use may only be known at runtime. In such a scenario, a RequestOptional for unrestricted FileIOPermission may be the best of a less than ideal set of choices if one is attempting to develop a least CAS privilege application. It at least gives the administrator the option to set a CAS policy that restricts the application to only those paths it really needs to use.
"Nicole Calinoiu" wrote:
Unrestricted FileIOPermission confers the ability to read and write any file
on a local or remote drive. Since your particular example is an
assembly-level RequestOptional for unrestricted FileIOPermission, it
basically ends up causing your assembly to be granted whatever
FileIOPermission it is allowed under CAS policy. (Sort of a "I'd like
everything, but I'll run with whatever you're willing to give me" result.)
"serge calderara" <sergecalderara@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:7349EA91-D94C-4DF9-A6B4-D6D497E0D49A@xxxxxxxxxxxxxxxx
> Dear all,
>
> I have seen in samples following assembly atribute :
>
> <Assembly:
> Security.Permissions.FileIOPermission(Security.Permissions.SecurityAction.RequestOptional,
> Unrestricted:=True)>
>
> What does the Unrestricted Flag means ?
>
> regards
> serge
.
- References:
- Re: Use of Unrestricted flag ???
- From: Nicole Calinoiu
- Re: Use of Unrestricted flag ???
- Prev by Date: Re: how to grant the application the required permission?
- Next by Date: Re: Client Certifcate Info in Web Service
- Previous by thread: Re: Use of Unrestricted flag ???
- Next by thread: Re: Client Certifcate Info in Web Service
- Index(es):
Relevant Pages
|