RtlCreateSecurityDescriptor - NtDoc

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

//
// Security Descriptors
//

/**
 * The RtlCreateSecurityDescriptor routine initializes a new absolute-format security descriptor.
 * On return, the security descriptor is initialized with no system ACL, no discretionary ACL, no owner, no primary group, and all control flags set to zero.
 *
 * \param SecurityDescriptor Pointer to the buffer for the \ref SECURITY_DESCRIPTOR to be initialized.
 * \param Revision Specifies the revision level to assign to the security descriptor. Set this parameter to SECURITY_DESCRIPTOR_REVISION.
 * \return NTSTATUS Successful or errant status.
 * \see https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlcreatesecuritydescriptor
 */
NTSYSAPI
NTSTATUS
NTAPI
RtlCreateSecurityDescriptor(
    _Out_ PSECURITY_DESCRIPTOR SecurityDescriptor,
    _In_ ULONG Revision
    );

#endif

View code on GitHub
// wdm.h

NTSYSAPI NTSTATUS RtlCreateSecurityDescriptor(
  [out] PSECURITY_DESCRIPTOR SecurityDescriptor,
  [in]  ULONG                Revision
);

View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-wdm-rtlcreatesecuritydescriptor)

RtlCreateSecurityDescriptor function

Description

The RtlCreateSecurityDescriptor routine initializes a new absolute-format security descriptor. On return, the security descriptor is initialized with no system ACL, no discretionary ACL, no owner, no primary group, and all control flags set to zero.

Parameters

SecurityDescriptor [out]

Pointer to the buffer for the SECURITY_DESCRIPTOR to be initialized.

Revision [in]

Specifies the revision level to assign to the security descriptor. Set this parameter to SECURITY_DESCRIPTOR_REVISION.

Return value

RtlCreateSecurityDescriptor can return one of the following.

Return code Description
STATUS_SUCCESS The call completed successfully.
STATUS_UNKNOWN_REVISION The caller specified an unsupported value for Revision.

Remarks

A successful call to this routine initializes a security descriptor. The fields in this descriptor are set to initial values that indicate that there are no security constraints.

See also

RtlLengthSecurityDescriptor

RtlSetDaclSecurityDescriptor

RtlValidSecurityDescriptor

SECURITY_DESCRIPTOR