From: Joseph Sutton Date: Sun, 12 Mar 2023 21:09:15 +0000 (+1300) Subject: libcli/security: Correctly handle ACL deletion X-Git-Tag: talloc-2.4.1~1354 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a625702e81ef2a6bd38c486e3056ce61da800e8;p=thirdparty%2Fsamba.git libcli/security: Correctly handle ACL deletion If there were two consecutive occurrences of an ACL to be deleted, we would miss the second one. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/libcli/security/security_descriptor.c b/libcli/security/security_descriptor.c index d6a7eda611b..ebc5c8f1f45 100644 --- a/libcli/security/security_descriptor.c +++ b/libcli/security/security_descriptor.c @@ -414,6 +414,7 @@ static NTSTATUS security_descriptor_acl_del(struct security_descriptor *sd, acl->aces = NULL; } found = true; + --i; } }