Add debug function

This allows for easier troubleshooting of invalid ACLs.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2024-09-23 23:43:31 +02:00
parent f343587a62
commit 5221ec8f51
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -306,3 +306,13 @@ def parse_acl_from_path(path):
Return: Complete ACL map Return: Complete ACL map
""" """
return parse_acl(read_acl_from_path(path)) return parse_acl(read_acl_from_path(path))
def debug_dump_acl_entries(acl):
for entry in acl:
print(f'tag: {entry.tag_type}', end='')
try:
print(f' qual: {entry.qualifier}')
except TypeError:
print()
print(f'read: {entry.permset.read}')