RtlGetOwnerSecurityDescriptor function (ntifs.h)

The RtlGetOwnerSecurityDescriptor routine returns the owner information for a given security descriptor.

Syntax

NTSYSAPI NTSTATUS RtlGetOwnerSecurityDescriptor(
  [in]  PSECURITY_DESCRIPTOR SecurityDescriptor,
  [out] PSID                 *Owner,
  [out] PBOOLEAN             OwnerDefaulted
);

Parameters

[in] SecurityDescriptor

Pointer to the security descriptor.

[out] Owner

Pointer to an address to receive a pointer to the owner security identifier (SID). If the security descriptor does not currently contain an owner SID, Owner receives NULL.

[out] OwnerDefaulted

Pointer to a Boolean variable that receives TRUE if the owner information is derived from a default mechanism, rather than by the original provider of the security descriptor explicitly, FALSE otherwise. Valid only if Owner receives a non-NULL value.

Return value

RtlGetOwnerSecurityDescriptor returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:

Return code Description
STATUS_UNKNOWN_REVISION
The security descriptor's revision level is not known or is not supported. This is an error code.

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.

Requirements

Requirement Value
Minimum supported client Windows 2000
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe (kernel mode); Ntdll.dll (user mode)
IRQL PASSIVE_LEVEL

See also

RtlCreateSecurityDescriptor

RtlLengthSecurityDescriptor

RtlSetDaclSecurityDescriptor

RtlSetOwnerSecurityDescriptor

RtlValidSecurityDescriptor

SECURITY_DESCRIPTOR

SID