RtlCheckTokenCapability - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WIN8)

// rev
NTSYSAPI
NTSTATUS
NTAPI
RtlCheckTokenCapability(
    _In_opt_ HANDLE TokenHandle,
    _In_ PSID CapabilitySidToCheck,
    _Out_ PBOOLEAN HasCapability
    );

#endif
#endif

View code on GitHub

Determines if a token can pass access checks that require the specified capability SID.

Parameters

Pseudo-handles

This function supports the following pseudo-handle values:

Implementation details

This function creates a security descriptor with a DACL that grants access to the user SID and the capability SID and performs an access checks against it via NtAccessCheck. Therefore, unsandboxed tokens are considered to have any capability.

Required OS version

This function was introduced in Windows 8.

Related Win32 API

See also