#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
);
View code on GitHub
// wdm.h
NTSYSAPI NTSTATUS RtlCreateSecurityDescriptor(
[out] PSECURITY_DESCRIPTOR SecurityDescriptor,
[in] ULONG Revision
);
View the official Windows Driver Kit DDI reference
This function is documented in Windows Driver Kit.
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.
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.
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. |
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.