RtlValidSid - NtDoc

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

//
// SIDs
//

_Must_inspect_result_
NTSYSAPI
BOOLEAN
NTAPI
RtlValidSid(
    _In_ PSID Sid
    );

#endif

View code on GitHub
// ntifs.h

NTSYSAPI BOOLEAN RtlValidSid(
  [in] PSID Sid
);

View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-ntifs-rtlvalidsid)

RtlValidSid function

Description

The RtlValidSid routine validates a security identifier (SID) by verifying that the revision number is within a known range and that the number of subauthorities is less than the maximum.

Parameters

Sid [in]

Pointer to the SID structure to validate.

Return value

RtlValidSid returns TRUE if the security descriptor is valid, FALSE otherwise.

Remarks

For more information about security and access control, see Windows security model for driver developers and the documentation on these topics in the Windows SDK.

See also

RtlEqualPrefixSid

RtlEqualSid

RtlInitializeSid

RtlLengthRequiredSid

RtlLengthSid

RtlSubAuthoritySid

SID