NtAccessCheck(3w)

NtAccessCheck3w

Usage

NTSTATUS NtAccessCheck
(
PSECURITY_DESCRIPTOR SecurityDescriptor,
HANDLE ClientToken,
ACCESS_MASK DesiredAccess,
PGENERIC_MAPPING GenericMapping,
PPRIVILEGE_SET PrivilegeSet,
PULONG ReturnLength,
PULONG GrantedAccess,
NTSTATUS* AccessStatus
)

Overview

Checks that a user represented by a token is allowed to access an object represented by a security descriptor.

Params

SecurityDescriptor [In] The security descriptor of the object to check.

ClientToken [In] Token of the user accessing the object.

DesiredAccess [In] The desired access to the object.

GenericMapping [In] Mapping used to transform access rights in the SD to their specific forms.

PrivilegeSet [In/Out] Privileges used during the access check.

ReturnLength [Out] Number of bytes stored into PrivilegeSet.

GrantedAccess [Out] The actual access rights granted.

AccessStatus [Out] The status of the access check.

Returns

NTSTATUS code.

Notes

DesiredAccess may be MAXIMUM_ALLOWED, in which case the function determines the maximum access rights allowed by the SD and returns them in GrantedAccess. The SecurityDescriptor must have a valid owner and groups present, otherwise the function will fail.

Implementation

Declared in "winternl.h".

Implemented in "dlls/ntdll/sec.c".

Debug channel "ntdll".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.