mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libcli: Use ARRAY_DEL_ELEMENT() in security_descriptor_acl_del()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
e74e85ee66
commit
3d9d984944
@ -366,8 +366,7 @@ static NTSTATUS security_descriptor_acl_del(struct security_descriptor *sd,
|
||||
/* there can be multiple ace's for one trustee */
|
||||
for (i=0;i<acl->num_aces;i++) {
|
||||
if (dom_sid_equal(trustee, &acl->aces[i].trustee)) {
|
||||
memmove(&acl->aces[i], &acl->aces[i+1],
|
||||
sizeof(acl->aces[i]) * (acl->num_aces - (i+1)));
|
||||
ARRAY_DEL_ELEMENT(acl->aces, i, acl->num_aces);
|
||||
acl->num_aces--;
|
||||
if (acl->num_aces == 0) {
|
||||
acl->aces = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user