This commit is contained in:
Silejonu 2025-07-30 20:57:58 +01:00 committed by GitHub
commit 40554e49ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) lines = run_acl(module, cmd)
counter = 0 counter = 0
for line in lines: for line in lines:
if line.endswith('*,*') and not use_nfsv4_acls: if not use_nfsv4_acls and not line.endswith('*,*'):
return False return True
# 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
# 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 list, followed by the existing entries. # 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 find twice. # So if the entry has already been registered, the entry should be found twice.
if counter == 2: if not use_nfsv4_acls or counter == 2:
return False return False
return True return True