GetSecurityDescriptorSacl function (securitybaseapi.h)

The GetSecurityDescriptorSacl function retrieves a pointer to the system access control list (SACL) in a specified security descriptor.

Syntax

BOOL GetSecurityDescriptorSacl(
  [in]  PSECURITY_DESCRIPTOR pSecurityDescriptor,
  [out] LPBOOL               lpbSaclPresent,
  [out] PACL                 *pSacl,
  [out] LPBOOL               lpbSaclDefaulted
);

Parameters

[in] pSecurityDescriptor

A pointer to the SECURITY_DESCRIPTOR structure that contains the SACL to which the function retrieves a pointer.

[out] lpbSaclPresent

A pointer to a flag the function sets to indicate the presence of a SACL in the specified security descriptor. If this parameter is TRUE, the security descriptor contains a SACL, and the remaining output parameters in this function receive valid values. If this parameter is FALSE, the security descriptor does not contain a SACL, and the remaining output parameters do not receive valid values.

[out] pSacl

A pointer to a pointer to an access control list (ACL). If a SACL exists, the function sets the pointer pointed to by pSacl to the address of the security descriptor's SACL. If a SACL does not exist, no value is stored.

If the function stores a NULL value in the pointer pointed to by pSacl, the security descriptor has a NULL SACL.

[out] lpbSaclDefaulted

A pointer to a flag that is set to the value of the SE_SACL_DEFAULTED flag in the SECURITY_DESCRIPTOR_CONTROL structure if a SACL exists for the security descriptor.

Return value

If the function succeeds, the function returns nonzero.

If the function fails, it returns zero. To get extended error information, call GetLastError.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header securitybaseapi.h (include Windows.h)
Library Advapi32.lib
DLL Advapi32.dll

See also

GetSecurityDescriptorControl

GetSecurityDescriptorDacl

GetSecurityDescriptorGroup

GetSecurityDescriptorLength

GetSecurityDescriptorOwner

InitializeSecurityDescriptor

IsValidSecurityDescriptor

Low-level Access Control

Low-level Access Control Functions

SECURITY_DESCRIPTOR

SECURITY_DESCRIPTOR_CONTROL

SetSecurityDescriptorSacl