Skip to content

Commit 20129d1

Browse files
douglasbagnallslowfranklin
authored andcommitted
python:ntacls: pull allow list out of loop
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14927 Signed-off-by: Douglas Bagnall <[email protected]> Reviewed-by: Ralph Boehme <[email protected]> Autobuild-User(master): Ralph Böhme <[email protected]> Autobuild-Date(master): Wed Mar 19 15:56:38 UTC 2025 on atb-devel-224
1 parent ff0e004 commit 20129d1

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

python/samba/ntacls.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,17 @@ def dsacl2fsacl(dssddl, sid, as_sddl=True):
299299
fdescr.group_sid = ref.group_sid
300300
fdescr.type = ref.type
301301
fdescr.revision = ref.revision
302-
aces = ref.dacl.aces
303-
304-
for i in range(0, len(aces)):
305-
ace = aces[i]
306-
307-
# Only apply allowed and deny ACEs, as they are the only ones
308-
# we can map to filesystem aces.
309-
#
310-
# In future we may need to include resource based aces...
311-
allowed_ace_types = [
312-
security.SEC_ACE_TYPE_ACCESS_ALLOWED,
313-
security.SEC_ACE_TYPE_ACCESS_DENIED,
314-
]
302+
303+
# Only apply allowed and deny ACEs, as they are the only ones
304+
# we can map to filesystem aces.
305+
#
306+
# In future we may need to include resource based aces...
307+
allowed_ace_types = [
308+
security.SEC_ACE_TYPE_ACCESS_ALLOWED,
309+
security.SEC_ACE_TYPE_ACCESS_DENIED,
310+
]
311+
312+
for ace in ref.dacl.aces:
315313
if not ace.type in allowed_ace_types:
316314
continue
317315

0 commit comments

Comments
 (0)