-static void
-print_acl(const void *p, const tchar *type)
-{
- const ACL *acl = p;
- u8 revision = acl->revision;
- u16 acl_size = le16_to_cpu(acl->acl_size);
- u16 ace_count = le16_to_cpu(acl->ace_count);
- tprintf(T(" [%"TS" ACL]\n"), type);
- tprintf(T(" Revision = %u\n"), revision);
- tprintf(T(" ACL Size = %u\n"), acl_size);
- tprintf(T(" ACE Count = %u\n"), ace_count);
-
- p += sizeof(ACL);
- for (u16 i = 0; i < ace_count; i++) {
- const ACEHeader *hdr = p;
- tprintf(T(" [ACE]\n"));
- tprintf(T(" ACE type = %d\n"), hdr->type);
- tprintf(T(" ACE flags = 0x%x\n"), hdr->flags);
- tprintf(T(" ACE size = %u\n"), hdr->size);
- const AccessAllowedACE *aaa = (const AccessAllowedACE*)hdr;
- tprintf(T(" ACE mask = %x\n"), le32_to_cpu(aaa->mask));
- tprintf(T(" SID start = %u\n"), le32_to_cpu(aaa->sid_start));
- p += hdr->size;
- }
- tputchar(T('\n'));
-}
-
-static void
-print_sid(const void *p, const tchar *type)
-{
- const SID *sid = p;
- tprintf(T(" [%"TS" SID]\n"), type);
- tprintf(T(" Revision = %u\n"), sid->revision);
- tprintf(T(" Subauthority count = %u\n"), sid->sub_authority_count);
- tprintf(T(" Identifier authority = "));
- print_byte_field(sid->identifier_authority,
- sizeof(sid->identifier_authority));
- tputchar(T('\n'));
- for (u8 i = 0; i < sid->sub_authority_count; i++) {
- tprintf(T(" Subauthority %u = %u\n"),
- i, le32_to_cpu(sid->sub_authority[i]));
- }
- tputchar(T('\n'));
-}