mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
s3:modules:nfs4_acls fix memory hierarchy in smb_create_smb4acl
the ACEs should be talloc children of the ACL itself and not be placed on talloc_tos() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
775d0a78c4
commit
c9d70740e3
@ -161,11 +161,10 @@ SMB4ACL_T *smb_create_smb4acl(void)
|
||||
SMB4ACE_T *smb_add_ace4(SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop)
|
||||
{
|
||||
SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
|
||||
TALLOC_CTX *mem_ctx = talloc_tos();
|
||||
SMB_ACE4_INT_T *ace;
|
||||
|
||||
ace = (SMB_ACE4_INT_T *)TALLOC_ZERO_SIZE(
|
||||
mem_ctx, sizeof(SMB_ACE4_INT_T));
|
||||
theacl, sizeof(SMB_ACE4_INT_T));
|
||||
if (ace==NULL)
|
||||
{
|
||||
DEBUG(0, ("TALLOC_SIZE failed\n"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user