Re: Check for certian privileges

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 05/12/05


Date: Thu, 12 May 2005 12:41:13 -0500

CAS does not check NT security. It checks the rights of the code to do
certain operations, not the user running the code.

The easiest and most reliable way to check check access to NT protected
resources is to try to open them and catch the UnauthorizedAccessException
that might happen. If you want to do this programmatically, you probably
want to be looking at p/invoke on the AccessCheck API function.

Joe K.

"john conwell" <johnconwell@discussions.microsoft.com> wrote in message
news:F8DD2019-35BD-4E53-BBD4-0AD588A231A1@microsoft.com...
> Let me expand on my question. From what i understand CAS checks if the
> calling assembly has rights to a certian resource. But what about plain
> ole
> fashioned user rights? Does CAS check that too? If the assembley has
> full
> trust, but the user does not have rights to the registry, how can I check
> if
> the user has rights or not?
>
> "john conwell" wrote:
>
>> I need to check if the user of the app has IO and Registy rights. How do
>> I
>> "Assert" that the current user of a WinForm app has these rights?
>>
>> Thanks,
>> John



Relevant Pages

  • RE: Permissions Questions
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... >> The CAS security model does not fit in anywhere on the OSI stack. ... >> is allowed to resolve DNS addresses, it doesn't have anything to do ... CAS permissions actually sit on top ...
    (microsoft.public.dotnet.security)
  • RE: Help me to understand Code Access Security. I dont get it.
    ... CAS has a wide range of possibilities. ... not have a minimum of permission. ... Remember one think is that CAS come on top of NTFS rights, ... "Ken Varn" wrote: ...
    (microsoft.public.dotnet.security)
  • Re: Check for certian privileges
    ... to control process flow is BAD practice, but I dont think I have another ... >> calling assembly has rights to a certian resource. ... Does CAS check that too? ...
    (microsoft.public.dotnet.security)
  • RE: Help me to understand Code Access Security. I dont get it.
    ... IMO the best book ever about CAS was ".NET Framework Security" by Brian LaMachia et al. ... not have a minimum of permission. ... Remember one think is that CAS come on top of NTFS rights, ...
    (microsoft.public.dotnet.security)

Quantcast