- SecurityDescriptor *sd = (SecurityDescriptor*)p;
- TO_LE16(sd->security_descriptor_control);
- TO_LE32(sd->owner_offset);
- TO_LE32(sd->group_offset);
- TO_LE32(sd->sacl_offset);
- TO_LE32(sd->dacl_offset);
- printf("Revision = %u\n", sd->revision);
- printf("Security Descriptor Control = %#x\n", sd->security_descriptor_control);
- printf("Owner offset = %u\n", sd->owner_offset);
- printf("Group offset = %u\n", sd->group_offset);
- printf("System ACL offset = %u\n", sd->sacl_offset);
- printf("Discretionary ACL offset = %u\n", sd->dacl_offset);
-
- if (sd->owner_offset != 0)
- print_sid(p + sd->owner_offset, "Owner");
- if (sd->group_offset != 0)
- print_sid(p + sd->group_offset, "Group");
- if (sd->sacl_offset != 0)
- print_acl(p + sd->sacl_offset, "System");
- if (sd->dacl_offset != 0)
- print_acl(p + sd->dacl_offset, "Discretionary");