<PackageReference Include="System.Security.AccessControl" Version="6.0.0-preview.4.21253.7" />

CommonSecurityDescriptor

Represents a security descriptor. A security descriptor includes an owner, a primary group, a Discretionary Access Control List (DACL), and a System Access Control List (SACL).
public DiscretionaryAcl DiscretionaryAcl { get; set; }

Gets or sets the discretionary access control list (DACL) for this CommonSecurityDescriptor object. The DACL contains access rules.

public bool IsContainer { get; }

Gets a Boolean value that specifies whether the object associated with this CommonSecurityDescriptor object is a container object.

public bool IsDiscretionaryAclCanonical { get; }

Gets a Boolean value that specifies whether the Discretionary Access Control List (DACL) associated with this CommonSecurityDescriptor object is in canonical order.

public bool IsDS { get; }

Gets a Boolean value that specifies whether the object associated with this CommonSecurityDescriptor object is a directory object.

public bool IsSystemAclCanonical { get; }

Gets a Boolean value that specifies whether the System Access Control List (SACL) associated with this CommonSecurityDescriptor object is in canonical order.

public SystemAcl SystemAcl { get; set; }

Gets or sets the System Access Control List (SACL) for this CommonSecurityDescriptor object. The SACL contains audit rules.

public CommonSecurityDescriptor(bool isContainer, bool isDS, byte[] binaryForm, int offset)

Initializes a new instance of the CommonSecurityDescriptor class from the specified array of byte values.

public CommonSecurityDescriptor(bool isContainer, bool isDS, ControlFlags flags, SecurityIdentifier owner, SecurityIdentifier group, SystemAcl systemAcl, DiscretionaryAcl discretionaryAcl)

Initializes a new instance of the CommonSecurityDescriptor class from the specified information.

public CommonSecurityDescriptor(bool isContainer, bool isDS, RawSecurityDescriptor rawSecurityDescriptor)

Initializes a new instance of the CommonSecurityDescriptor class from the specified RawSecurityDescriptor object.

public CommonSecurityDescriptor(bool isContainer, bool isDS, string sddlForm)

Initializes a new instance of the CommonSecurityDescriptor class from the specified Security Descriptor Definition Language (SDDL) string.

public void AddDiscretionaryAcl(byte revision, int trusted)

Sets the DiscretionaryAcl property for this CommonSecurityDescriptor instance and sets the DiscretionaryAclPresent flag.

public void AddSystemAcl(byte revision, int trusted)

Sets the SystemAcl property for this CommonSecurityDescriptor instance and sets the SystemAclPresent flag.

Removes all access rules for the specified security identifier from the Discretionary Access Control List (DACL) associated with this CommonSecurityDescriptor object.

public void PurgeAudit(SecurityIdentifier sid)

Removes all audit rules for the specified security identifier from the System Access Control List (SACL) associated with this CommonSecurityDescriptor object.

public void SetDiscretionaryAclProtection(bool isProtected, bool preserveInheritance)

Sets the inheritance protection for the Discretionary Access Control List (DACL) associated with this CommonSecurityDescriptor object. DACLs that are protected do not inherit access rules from parent containers.

public void SetSystemAclProtection(bool isProtected, bool preserveInheritance)

Sets the inheritance protection for the System Access Control List (SACL) associated with this CommonSecurityDescriptor object. SACLs that are protected do not inherit audit rules from parent containers.