GetSecurityDescriptorSacl function

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

Syntax

BOOL GetSecurityDescriptorSacl(
  PSECURITY_DESCRIPTOR pSecurityDescriptor,
  LPBOOL               lpbSaclPresent,
  PACL                 *pSacl,
  LPBOOL               lpbSaclDefaulted
);

Parameters

pSecurityDescriptor

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

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.

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.

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

   
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