Compare commits

...

3 commits

Author SHA1 Message Date
Silejonu
e0e778816d
Merge 9ec1d668b4 into dabaca4b70 2025-06-05 06:54:50 +00:00
Silejonu
9ec1d668b4 refactor(acl): improve execution speed 2025-06-05 08:54:42 +02:00
Silejonu
392fd0deaa fix(acl): correctly assert needed changes when recursive is true 2025-05-10 09:59:10 +02:00
2 changed files with 7 additions and 5 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- acl - correctly assert needed changes when pointing to a directory and recursive is set to true.

View file

@ -244,16 +244,16 @@ def acl_changed(module, cmd, entry, use_nfsv4_acls=False):
lines = run_acl(module, cmd)
counter = 0
for line in lines:
if line.endswith('*,*') and not use_nfsv4_acls:
return False
if not use_nfsv4_acls and not line.endswith('*,*'):
return True
# if use_nfsv4_acls and entry is listed
if use_nfsv4_acls and entry == line:
counter += 1
# The current 'nfs4_setfacl --test' lists a new entry,
# which will be added at the top of list, followed by the existing entries.
# So if the entry has already been registered, the entry should be find twice.
if counter == 2:
# which will be added at the top of the list, followed by the existing entries.
# So if the entry has already been registered, the entry should be found twice.
if not use_nfsv4_acls or counter == 2:
return False
return True