git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e74e85e
)
libcli: Use ARRAY_DEL_ELEMENT() in security_descriptor_acl_del()
author
Volker Lendecke
<vl@samba.org>
Thu, 26 Mar 2020 10:04:31 +0000
(11:04 +0100)
committer
Ralph Boehme
<slow@samba.org>
Thu, 26 Mar 2020 14:43:31 +0000
(14:43 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
libcli/security/security_descriptor.c
patch
|
blob
|
history
diff --git
a/libcli/security/security_descriptor.c
b/libcli/security/security_descriptor.c
index 7761eca350686185e66a034232632ba57eaea7fa..28c68215b8a56de09e74d8aa1f9c105964d54f53 100644
(file)
--- a/
libcli/security/security_descriptor.c
+++ b/
libcli/security/security_descriptor.c
@@
-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;