PHP Class LdapTools\Security\SecurityDescriptor

See also: https://msdn.microsoft.com/en-us/library/cc230273.aspx
Author: Chad Sikorra ([email protected])
Inheritance: use trait LdapTools\Utilities\NumberUtilitiesTrait
Show file Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Property Type Description
$aclFlagMap A simple map of SDDL control flags and their ControlFlag constant names (minus the prepended ACL type)
$controlFlags ControlFlags
$dacl null | LdapTools\Security\Acl\Dacl
$group null | SID
$owner null | SID
$revision The security descriptor revision.
$rmControlFlags The resource manager control flags.
$sacl null | LdapTools\Security\Acl\Sacl

Public Methods

Method Description
__construct ( null | string $descriptor = null )
__toString ( ) : string
getControlFlags ( ) : ControlFlags Get the ACE control flags.
getDacl ( ) : Dacl | null Get the Discretionary ACL
getGroup ( ) : SID Get the group SID for the security descriptor.
getOwner ( ) : SID | null Get the owner SID for the security descriptor.
getRevision ( ) : integer
getRmControlFlags ( ) : Flags Get the Resource Manager control flag value. This specifies control bits that contain specific information for the resource manager accessing it and the RM_CONTROL_VALID flag is set in the controls.
getSacl ( ) : Sacl | null Get the System ACL.
setControlFlags ( ControlFlags $controlFlags ) Set the ACE control flags object.
setDacl ( Dacl $dacl = null ) Set the Discretionary ACL.
setGroup ( SID | string $group ) Set the group SID for the security descriptor.
setOwner ( SID | string $owner ) Set the owner SID for the security descriptor.
setSacl ( Sacl $sacl = null ) Set the System ACL.
toBinary ( boolean $canonicalize = true ) : string Get the binary string form of the security descriptor.
toSddl ( boolean $canonicalize = true ) : string Get the SDDL string format that represents this Security Descriptor and everything it contains.

Protected Methods

Method Description
decodeFromBinary ( string $descriptor )
getAclSddlFlags ( Acl $acl ) : string Get the string flags that need to be prepended to the Dacl/Sacl SDDL string.
toggleAclPresent ( boolean $present, string $identifier )

Method Details

__construct() public method

public __construct ( null | string $descriptor = null )
$descriptor null | string

__toString() public method

public __toString ( ) : string
return string

decodeFromBinary() protected method

protected decodeFromBinary ( string $descriptor )
$descriptor string

getAclSddlFlags() protected method

Get the string flags that need to be prepended to the Dacl/Sacl SDDL string.
protected getAclSddlFlags ( Acl $acl ) : string
$acl LdapTools\Security\Acl\Acl
return string

getControlFlags() public method

Get the ACE control flags.
public getControlFlags ( ) : ControlFlags
return ControlFlags

getDacl() public method

Get the Discretionary ACL
public getDacl ( ) : Dacl | null
return LdapTools\Security\Acl\Dacl | null

getGroup() public method

Get the group SID for the security descriptor.
public getGroup ( ) : SID
return SID

getOwner() public method

Get the owner SID for the security descriptor.
public getOwner ( ) : SID | null
return SID | null

getRevision() public method

public getRevision ( ) : integer
return integer

getRmControlFlags() public method

Get the Resource Manager control flag value. This specifies control bits that contain specific information for the resource manager accessing it and the RM_CONTROL_VALID flag is set in the controls.
public getRmControlFlags ( ) : Flags
return Flags

getSacl() public method

Get the System ACL.
public getSacl ( ) : Sacl | null
return LdapTools\Security\Acl\Sacl | null

setControlFlags() public method

Set the ACE control flags object.
public setControlFlags ( ControlFlags $controlFlags )
$controlFlags ControlFlags

setDacl() public method

Set the Discretionary ACL.
public setDacl ( Dacl $dacl = null )
$dacl LdapTools\Security\Acl\Dacl

setGroup() public method

Set the group SID for the security descriptor.
public setGroup ( SID | string $group )
$group SID | string

setOwner() public method

Set the owner SID for the security descriptor.
public setOwner ( SID | string $owner )
$owner SID | string

setSacl() public method

Set the System ACL.
public setSacl ( Sacl $sacl = null )
$sacl LdapTools\Security\Acl\Sacl

toBinary() public method

Get the binary string form of the security descriptor.
public toBinary ( boolean $canonicalize = true ) : string
$canonicalize boolean Whether or not to canonicalize the DACL
return string

toSddl() public method

Get the SDDL string format that represents this Security Descriptor and everything it contains.
public toSddl ( boolean $canonicalize = true ) : string
$canonicalize boolean Whether or not to canonicalize the DACL
return string

toggleAclPresent() protected method

protected toggleAclPresent ( boolean $present, string $identifier )
$present boolean
$identifier string

Property Details

$aclFlagMap protected property

A simple map of SDDL control flags and their ControlFlag constant names (minus the prepended ACL type)
protected $aclFlagMap

$controlFlags protected property

protected ControlFlags,LdapTools\Security $controlFlags
return ControlFlags

$dacl protected property

protected null|Dacl,LdapTools\Security\Acl $dacl
return null | LdapTools\Security\Acl\Dacl

$group protected property

protected null|SID,LdapTools\Security $group
return null | SID

$owner protected property

protected null|SID,LdapTools\Security $owner
return null | SID

$revision protected property

The security descriptor revision.
protected $revision

$rmControlFlags protected property

The resource manager control flags.
protected $rmControlFlags

$sacl protected property

protected null|Sacl,LdapTools\Security\Acl $sacl
return null | LdapTools\Security\Acl\Sacl