Compare commits

..

1 commit

Author SHA1 Message Date
Silejonu
95e9d033e5
Merge 392fd0deaa into dabaca4b70 2025-05-20 21:17:53 +02:00

View file

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