pub enum Ace {
Show 15 variants
ACCESS_ALLOWED_ACE {
header: AceHeader,
sid: Sid,
_padding: Vec<u8>,
},
ACCESS_ALLOWED_OBJECT_ACE {
header: AceHeader,
object_type: Guid,
inherited_object_type: Guid,
sid: Sid,
_padding: Vec<u8>,
},
ACCESS_DENIED_ACE {
header: AceHeader,
sid: Sid,
_padding: Vec<u8>,
},
ACCESS_DENIED_OBJECT_ACE {
header: AceHeader,
object_type: Guid,
inherited_object_type: Guid,
sid: Sid,
_padding: Vec<u8>,
},
ACCESS_ALLOWED_CALLBACK_ACE {
header: AceHeader,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
ACCESS_DENIED_CALLBACK_ACE {
header: AceHeader,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
ACCESS_ALLOWED_CALLBACK_OBJECT_ACE {
header: AceHeader,
object_type: Guid,
inherited_object_type: Guid,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
ACCESS_DENIED_CALLBACK_OBJECT_ACE {
header: AceHeader,
object_type: Guid,
inherited_object_type: Guid,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
SYSTEM_AUDIT_ACE {
header: AceHeader,
sid: Sid,
_padding: Vec<u8>,
},
SYSTEM_AUDIT_OBJECT_ACE {
header: AceHeader,
object_type: Guid,
inherited_object_type: Guid,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
SYSTEM_AUDIT_CALLBACK_ACE {
header: AceHeader,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
SYSTEM_MANDATORY_LABEL_ACE {
header: AceHeader,
sid: Sid,
_padding: Vec<u8>,
},
SYSTEM_AUDIT_CALLBACK_OBJECT_ACE {
header: AceHeader,
object_type: Guid,
inherited_object_type: Guid,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
SYSTEM_RESOURCE_ATTRIBUTE_ACE {
header: AceHeader,
object_type: Guid,
inherited_object_type: Guid,
sid: Sid,
application_data: Vec<u8>,
is_conditional: bool,
_padding: Vec<u8>,
},
SYSTEM_SCOPED_POLICY_ID_ACE {
header: AceHeader,
sid: Sid,
_padding: Vec<u8>,
},
}Expand description
Variants§
ACCESS_ALLOWED_ACE
The ACCESS_ALLOWED_ACE structure defines an ACE for the discretionary access control list (DACL) that controls access to an object. An access-allowed ACE allows access to an object for a specific trustee identified by a security identifier (SID).
ACCESS_ALLOWED_OBJECT_ACE
The ACCESS_ALLOWED_OBJECT_ACE structure defines an ACE that controls allowed access to an object, a property set, or property. The ACE contains a set of access rights, a GUID that identifies the type of object, and a SID that identifies the trustee to whom the system will grant access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.
Fields
object_type: GuidA GUID that identifies a property set, property, extended right, or type of child object. The purpose of this GUID depends on the user rights specified in the Mask field. This field is valid only if the ACE_OBJECT_TYPE_PRESENT bit is set in the Flags field. Otherwise, the ObjectType field is ignored. For information on access rights and for a mapping of the control access rights to the corresponding GUID value that identifies each right, see [MS-ADTS] sections 5.1.3.2 and 5.1.3.2.1.
ACCESS_MASK bits are not mutually exclusive. Therefore, the ObjectType field can be set in an ACE with any ACCESS_MASK. If the AccessCheck algorithm calls this ACE and does not find an appropriate GUID, then that ACE will be ignored. For more information on access checks and object access, see [MS-ADTS] section 5.1.3.3.3.
inherited_object_type: GuidA GUID that identifies the type of child object that can inherit the ACE. Inheritance is also controlled by the inheritance flags in the ACE_HEADER, as well as by any protection against inheritance placed on the child objects. This field is valid only if the ACE_INHERITED_OBJECT_TYPE_PRESENT bit is set in the Flags member. Otherwise, the InheritedObjectType field is ignored.
ACCESS_DENIED_ACE
The ACCESS_DENIED_ACE structure defines an ACE for the DACL that controls access to an object. An access-denied ACE denies access to an object for a specific trustee identified by a SID.
ACCESS_DENIED_OBJECT_ACE
The ACCESS_DENIED_OBJECT_ACE structure defines an ACE that controls denied access to an object, a property set, or a property. The ACE contains a set of access rights, a GUID that identifies the type of object, and a SID that identifies the trustee to whom the system will deny access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.
Fields
ACCESS_ALLOWED_CALLBACK_ACE
The ACCESS_ALLOWED_CALLBACK_ACE structure defines an ACE for the DACL that controls access to an object. An access-allowed ACE allows access to an object for a specific trustee identified by a SID.
Fields
application_data: Vec<u8>Optional application data. The size of the application data is determined by the AceSize field of the ACE_HEADER.
ACCESS_DENIED_CALLBACK_ACE
The ACCESS_DENIED_CALLBACK_ACE structure defines an ACE for the DACL that controls access to an object. An access-denied ACE denies access to an object for a specific trustee identified by a SID.
Fields
application_data: Vec<u8>Optional application data. The size of the application data is determined by the AceSize field of the ACE_HEADER.
ACCESS_ALLOWED_CALLBACK_OBJECT_ACE
The ACCESS_ALLOWED_CALLBACK_OBJECT_ACE structure defines an ACE that controls allowed access to an object, property set, or property. The ACE contains a set of user rights, a GUID that identifies the type of object, and a SID that identifies the trustee to whom the system will grant access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.
Fields
object_type: GuidA GUID that identifies a property set, property, extended right, or type of child object. The purpose of this GUID depends on the user rights specified in the Mask field. This field is valid only if the ACE _OBJECT_TYPE_PRESENT bit is set in the Flags field. Otherwise, the ObjectType field is ignored.
inherited_object_type: GuidA GUID that identifies the type of child object that can inherit the ACE. Inheritance is also controlled by the inheritance flags in the ACE_HEADER, as well as by any protection against inheritance placed on the child objects. This field is valid only if the ACE_INHERITED_OBJECT_TYPE_PRESENT bit is set in the Flags member. Otherwise, the InheritedObjectType field is ignored.
application_data: Vec<u8>Optional application data. The size of the application data is determined by the AceSize field of the ACE_HEADER.
ACCESS_DENIED_CALLBACK_OBJECT_ACE
The ACCESS_DENIED_CALLBACK_OBJECT_ACE structure defines an ACE that controls denied access to an object, a property set, or property. The ACE contains a set of user rights, a GUID that identifies the type of object, and a SID that identifies the trustee to whom the system will deny access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.
Fields
object_type: GuidA GUID that identifies a property set, property, extended right, or type of child object. The purpose of this GUID depends on the user rights specified in the Mask field. This field is valid only if the ACE _OBJECT_TYPE_PRESENT bit is set in the Flags field. Otherwise, the ObjectType field is ignored.
inherited_object_type: GuidA GUID that identifies the type of child object that can inherit the ACE. Inheritance is also controlled by the inheritance flags in the ACE_HEADER, as well as by any protection against inheritance placed on the child objects. This field is valid only if the ACE_INHERITED_OBJECT_TYPE_PRESENT bit is set in the Flags member. Otherwise, the InheritedObjectType field is ignored.
application_data: Vec<u8>Optional application data. The size of the application data is determined by the AceSize field of the ACE_HEADER.
SYSTEM_AUDIT_ACE
The SYSTEM_AUDIT_ACE structure defines an access ACE for the system access control list (SACL) that specifies what types of access cause system-level notifications. A system-audit ACE causes an audit message to be logged when a specified trustee attempts to gain access to an object. The trustee is identified by a SID.
Fields
sid: SidThe SID of a trustee. The length of the SID MUST be a multiple of 4. An access attempt of a kind specified by the Mask field by any trustee whose SID matches the Sid field causes the system to generate an audit message. If an application does not specify a SID for this field, audit messages are generated for the specified access rights for all trustees.
SYSTEM_AUDIT_OBJECT_ACE
The SYSTEM_AUDIT_OBJECT_ACE structure defines an ACE for a SACL. The ACE can audit access to an object or subobjects, such as property sets or properties. The ACE contains a set of user rights, a GUID that identifies the type of object or subobject, and a SID that identifies the trustee for whom the system will audit access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.
Fields
object_type: GuidA GUID that identifies a property set, a property, an extended right, or a type of child object. The purpose of this GUID depends on the user rights specified in the Mask field. This field is valid only if the ACE_OBJECT_TYPE_PRESENT bit is set in the Flags field. Otherwise, the ObjectType field is ignored.
inherited_object_type: GuidA GUID that identifies the type of child object that can inherit the ACE. Inheritance is also controlled by the inheritance flags in the ACE_HEADER, as well as by any protection against inheritance placed on the child objects. This field is valid only if the ACE_INHERITED_OBJECT_TYPE_PRESENT bit is set in the Flags member. Otherwise, the InheritedObjectType field is ignored.
SYSTEM_AUDIT_CALLBACK_ACE
The SYSTEM_AUDIT_CALLBACK_ACE structure defines an ACE for the SACL that specifies what types of access cause system-level notifications. A system-audit ACE causes an audit message to be logged when a specified trustee attempts to gain access to an object. The trustee is identified by a SID.
Fields
sid: SidThe SID of a trustee. The length of the SID MUST be a multiple of 4. An access attempt of a kind specified by the Mask field by any trustee whose SID matches the Sid field causes the system to generate an audit message. If an application does not specify a SID for this field, audit messages are generated for the specified access rights for all trustees.
application_data: Vec<u8>Optional application data. The size of the application data is determined by the AceSize field of the ACE_HEADER.
SYSTEM_MANDATORY_LABEL_ACE
The SYSTEM_MANDATORY_LABEL_ACE structure defines an ACE for the SACL that specifies the mandatory access level and policy for a securable object
Fields
sid: SidThe SID of a trustee. The length of the SID MUST be a multiple of 4. The identifier authority of the SID must be SECURITY_MANDATORY_LABEL_AUTHORITY. The RID of the SID specifies the mandatory integrity level of the object associated with the SACL that contains this ACE. The RID must be one of the following values.
SYSTEM_AUDIT_CALLBACK_OBJECT_ACE
The SYSTEM_AUDIT_CALLBACK_OBJECT_ACE structure defines an ACE for a SACL. The ACE can audit access to an object or subobjects, such as property sets or properties. The ACE contains a set of user rights, a GUID that identifies the type of object or subobject, and a SID that identifies the trustee for whom the system will audit access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.
Fields
object_type: GuidA GUID that identifies a property set, property, extended right, or type of child object. The purpose of this GUID depends on the user rights specified in the Mask field. This field is valid only if the ACE_OBJECT_TYPE_PRESENT bit is set in the Flags field. Otherwise, the ObjectType field is ignored.
inherited_object_type: GuidA GUID that identifies the type of child object that can inherit the ACE. Inheritance is also controlled by the inheritance flags in the ACE_HEADER, as well as by any protection against inheritance placed on the child objects. This field is valid only if the ACE_INHERITED_OBJECT_TYPE_PRESENT bit is set in the Flags member. Otherwise, the InheritedObjectType field is ignored.
SYSTEM_RESOURCE_ATTRIBUTE_ACE
The SYSTEM_RESOURCE_ATTRIBUTE_ACE structure defines an ACE for the specification of a resource attribute associated with an object. A SYSTEM_RESOURCE_ATTRIBUTE_ACE is used in conditional ACEs in specifying access or audit policy for the resource.
Fields
SYSTEM_SCOPED_POLICY_ID_ACE
The SYSTEM_SCOPED_POLICY_ID_ACE structure defines an ACE for the purpose of applying a central access policy to the resource.
Fields
sid: SidA SID that identifies a central access policy. For a SYSTEM_SCOPED_POLICY_ID_ACE to be applicable on a resource, this SID MUST match a CAPID of a CentralAccessPolicy contained in the CentralAccessPoliciesList (as specified in [MS-GPCAP] section 3.2.1.1) of the machine on which the access evaluation will be performed.
Implementations§
source§impl Ace
impl Ace
pub fn access_allowed(flags: AceFlags, mask: AccessMask, sid: Sid) -> Self
pub fn access_denied(flags: AceFlags, mask: AccessMask, sid: Sid) -> Self
pub fn access_allowed_object( flags: AceFlags, mask: AccessMask, object_type: Guid, inherited_object_type: Guid, sid: Sid, ) -> Self
pub fn access_denied_object( flags: AceFlags, mask: AccessMask, object_type: Guid, inherited_object_type: Guid, sid: Sid, ) -> Self
pub fn access_allowed_callback( flags: AceFlags, mask: AccessMask, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn access_denied_callback( flags: AceFlags, mask: AccessMask, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn access_allowed_object_callback( flags: AceFlags, mask: AccessMask, object_type: Guid, inherited_object_type: Guid, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn access_denied_object_callback( flags: AceFlags, mask: AccessMask, object_type: Guid, inherited_object_type: Guid, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn audit(flags: AceFlags, mask: AccessMask, sid: Sid) -> Self
pub fn audit_object( flags: AceFlags, mask: AccessMask, object_type: Guid, inherited_object_type: Guid, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn audit_callback( flags: AceFlags, mask: AccessMask, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn mandatory_label(flags: AceFlags, mask: AccessMask, sid: Sid) -> Self
pub fn audit_callback_object( flags: AceFlags, mask: AccessMask, object_type: Guid, inherited_object_type: Guid, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn resource_attribute( flags: AceFlags, mask: AccessMask, object_type: Guid, inherited_object_type: Guid, sid: Sid, application_data: Vec<u8>, ) -> Self
pub fn scoped_policy_id(flags: AceFlags, mask: AccessMask, sid: Sid) -> Self
Trait Implementations§
source§impl BinRead for Ace
impl BinRead for Ace
source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moresource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moresource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moresource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moresource§impl BinWrite for Ace
impl BinWrite for Ace
source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming big-endian byte order. Read moresource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming little-endian byte order. Read more