1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

posix_acls: Use talloc_zero_array

This is a slight change in behaviour: We now also zero out
the space for num_profile_acls.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2017-02-09 18:46:06 +01:00 committed by Jeremy Allison
parent 2dc369feac
commit cc3417549c

View File

@ -3359,7 +3359,7 @@ static NTSTATUS posix_get_nt_acl_common(struct connection_struct *conn,
num_acls = count_canon_ace_list(file_ace);
num_def_acls = count_canon_ace_list(dir_ace);
nt_ace_list = talloc_array(
nt_ace_list = talloc_zero_array(
talloc_tos(), struct security_ace,
num_acls + num_profile_acls + num_def_acls);
@ -3368,8 +3368,6 @@ static NTSTATUS posix_get_nt_acl_common(struct connection_struct *conn,
goto done;
}
memset(nt_ace_list, '\0', (num_acls + num_def_acls) * sizeof(struct security_ace) );
/*
* Create the NT ACE list from the canonical ace lists.
*/