-/* At the start of each type of access control entry. */
-typedef struct _ACE_HEADER {
- /* enum ace_type, specifies what type of ACE this is. */
- u8 type;
-
- /* bitwise OR of the inherit ACE flags #defined above */
- u8 flags;
-
- /* Size of the access control entry. */
- le16 size;
-} _packed_attribute ACE_HEADER;
-
-/* Grants rights to a user or group */
-typedef struct _ACCESS_ALLOWED_ACE {
- ACE_HEADER hdr;
- le32 mask;
- le32 sid_start;
-} _packed_attribute ACCESS_ALLOWED_ACE;
-
-/* Denies rights to a user or group */
-typedef struct _ACCESS_DENIED_ACE {
- ACE_HEADER hdr;
- le32 mask;
- le32 sid_start;
-} _packed_attribute ACCESS_DENIED_ACE;
-
-typedef struct _SYSTEM_AUDIT_ACE {
- ACE_HEADER hdr;
- le32 mask;
- le32 sid_start;
-} _packed_attribute SYSTEM_AUDIT_ACE;
-
-
-/* Header of an access control list. */
-typedef struct _ACL {
- /* ACL_REVISION or ACL_REVISION_DS */
- u8 revision;
-
- /* padding */
- u8 sbz1;
-
- /* Total size of the ACL, including all access control entries */
- le16 acl_size;
-
- /* Number of access control entry structures that follow the ACL
- * structure. */
- le16 ace_count;
-
- /* padding */
- le16 sbz2;
-} _packed_attribute ACL;
-
-/* A structure used to identify users or groups. */
-typedef struct _SID {
-
- /* example: 0x1 */
- u8 revision;
- u8 sub_authority_count;
-
- /* Identifies the authority that issued the SID. Can be, but does not
- * have to be, one of enum sid_authority_value */
- u8 identifier_authority[6];
-
- le32 sub_authority[];
-} _packed_attribute SID;
-
-typedef struct _SECURITY_DESCRIPTOR_RELATIVE {
- /* Example: 0x1 */
- u8 revision;
- /* Example: 0x0 */
- u8 sbz1;
-
- /* Example: 0x4149 */
- le16 security_descriptor_control;
-
- /* Offset of a SID structure in the security descriptor. */
- /* Example: 0x14 */
- le32 owner_offset;
-
- /* Offset of a SID structure in the security descriptor. */
- /* Example: 0x24 */
- le32 group_offset;
-
- /* Offset of an ACL structure in the security descriptor. */
- /* System ACL. */
- /* Example: 0x00 */
- le32 sacl_offset;
-
- /* Offset of an ACL structure in the security descriptor. */
- /* Discretionary ACL. */
- /* Example: 0x34 */
- le32 dacl_offset;
-} _packed_attribute SECURITY_DESCRIPTOR_RELATIVE;
-