CSecurityDesc::SetSacl

Sets information in a system access-control list (SACL). If a SACL is already present in the security descriptor, it is replaced.

bool SetSacl( 
   const CSacl & Sacl, 
   bool bDefaulted = false  
) throw(...);

Parameters

  • Sacl
    Pointer to an CSacl object specifying the SACL for the security descriptor. This parameter must not be NULL, and must be a CSacl object. Unlike DACLs, there is no difference between NULL and an empty SACL, as SACL objects do not specify access rights, only auditing information.

  • bDefaulted
    Specifies a flag indicating the source of the SACL. If this flag is true, the SACL has been retrieved by some default mechanism. If false, the SACL has been explicitly specified by a user. The method stores this value in the SE_SACL_DEFAULTED flag of the SECURITY_DESCRIPTOR_CONTROL structure. If this parameter is not specified, the SE_SACL_DEFAULTED flag is cleared.

Return Value

Returns true on success, false on failure.

Requirements

Header: atlsecurity.h

See Also

Reference

CSecurityDesc Class

CSecurityDesc::SetControl

CSecurityDesc::SetGroup

CSecurityDesc::SetDacl

CSecurityDesc::SetOwner

CSecurityDesc::GetSacl