SeSinglePrivilegeCheck function

The SeSinglePrivilegeCheck routine checks for the passed privilege value in the context of the current thread.

Syntax

BOOLEAN SeSinglePrivilegeCheck(
  LUID            PrivilegeValue,
  KPROCESSOR_MODE PreviousMode
);

Parameters

PrivilegeValue

Specifies the LUID value of the privilege being checked.

PreviousMode

Specifies the previous execution mode, one of UserMode or KernelMode.

Return Value

SeSinglePrivilegeCheck returns TRUE if the current subject has the required privilege.

Remarks

If PreviousMode is KernelMode, the privilege check always succeeds. Otherwise, this routine uses the token of the user-mode thread to determine whether the current (user-mode) thread has been granted the given privilege.

Requirements

   
Minimum supported client Available in Windows 2000 and later versions of Windows.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules PowerIrpDDis, HwStorPortProhibitedDDIs

See Also

LUID

RtlConvertLongToLuid

RtlConvertUlongToLuid

RtlEqualLuid

SeValidSecurityDescriptor