#ifndef _NTRTL_H
//
// SIDs
//
_Must_inspect_result_
NTSYSAPI
BOOLEAN
NTAPI
RtlValidSid(
_In_ PSID Sid
);
View code on GitHub
// ntifs.h
NTSYSAPI BOOLEAN RtlValidSid(
[in] PSID Sid
);
View the official Windows Driver Kit DDI reference
This function is documented in Windows Driver Kit.
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.
Sid
[in]Pointer to the SID structure to validate.
RtlValidSid returns TRUE if the security descriptor is valid, FALSE otherwise.
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.