]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: Correctly handle ACL deletion
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Sun, 12 Mar 2023 21:09:15 +0000 (10:09 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 Mar 2023 18:40:31 +0000 (18:40 +0000)
If there were two consecutive occurrences of an ACL to be deleted, we
would miss the second one.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/security_descriptor.c

index d6a7eda611bbdd1cd570d7356e4adf7f6bad212f..ebc5c8f1f458866931884bea3061999a8b69e435 100644 (file)
@@ -414,6 +414,7 @@ static NTSTATUS security_descriptor_acl_del(struct security_descriptor *sd,
                                acl->aces = NULL;
                        }
                        found = true;
+                       --i;
                }
        }