Windows Driver Kit: Kernel-Mode Driver Architecture
SeSinglePrivilegeCheck
SeSinglePrivilegeCheck checks for the passed privilege value in the context of the current thread.
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.
Comments
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
IRQL: PASSIVE_LEVEL
Headers: Declared in ntddk.h. Include ntddk.h.
See Also
RtlConvertLongToLuid, RtlConvertUlongToLuid, RtlEqualLuid, SeValidSecurityDescriptor, LUID