1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-17 04:23:50 +03:00

python:ntacls: pull allow list out of loop

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14927

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Mar 19 15:56:38 UTC 2025 on atb-devel-224
This commit is contained in:
Douglas Bagnall
2025-03-07 15:51:18 +13:00
committed by Ralph Boehme
parent ff0e0045ed
commit 20129d16dc

View File

@@ -299,19 +299,17 @@ def dsacl2fsacl(dssddl, sid, as_sddl=True):
fdescr.group_sid = ref.group_sid
fdescr.type = ref.type
fdescr.revision = ref.revision
aces = ref.dacl.aces
for i in range(0, len(aces)):
ace = aces[i]
# Only apply allowed and deny ACEs, as they are the only ones
# we can map to filesystem aces.
#
# In future we may need to include resource based aces...
allowed_ace_types = [
security.SEC_ACE_TYPE_ACCESS_ALLOWED,
security.SEC_ACE_TYPE_ACCESS_DENIED,
]
# Only apply allowed and deny ACEs, as they are the only ones
# we can map to filesystem aces.
#
# In future we may need to include resource based aces...
allowed_ace_types = [
security.SEC_ACE_TYPE_ACCESS_ALLOWED,
security.SEC_ACE_TYPE_ACCESS_DENIED,
]
for ace in ref.dacl.aces:
if not ace.type in allowed_ace_types:
continue