BOOLEAN
SeSinglePrivilegeCheck(
LUID PrivilegeValue,
KPROCESSOR_MODE PreviousMode
);
SeSinglePrivilegeCheck checks for the passed privilege value in the context of the current thread.
SeSinglePrivilegeCheck returns TRUE if the current subject has the required privilege.
Network transport drivers call this routine.
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.
Callers of SeSinglePrivilegeCheck must be running at IRQL PASSIVE_LEVEL.