From 9158974540d0e311021f04789ed75ebda466c5b3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 10 Oct 2012 10:18:32 +1100 Subject: smbd: Add mem_ctx to sys_acl_init() and all callers This changes from allocation on NULL to allocation on the supplied memory context. Currently that supplied context is talloc_tos() at the the final consumer of the ACL. Andrew Bartlett --- source3/smbd/trans2.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 44c457cae5..61d755c03f 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4911,12 +4911,14 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, uint16 num_def_acls = 0; if (fsp && fsp->fh->fd != -1) { - file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp); + file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, + talloc_tos()); } else { file_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, smb_fname->base_name, - SMB_ACL_TYPE_ACCESS); + SMB_ACL_TYPE_ACCESS, + talloc_tos()); } if (file_acl == NULL && no_acl_syscall_error(errno)) { @@ -4933,13 +4935,15 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, SMB_VFS_SYS_ACL_GET_FILE( conn, fsp->fsp_name->base_name, - SMB_ACL_TYPE_DEFAULT); + SMB_ACL_TYPE_DEFAULT, + talloc_tos()); } else { def_acl = SMB_VFS_SYS_ACL_GET_FILE( conn, smb_fname->base_name, - SMB_ACL_TYPE_DEFAULT); + SMB_ACL_TYPE_DEFAULT, + talloc_tos()); } def_acl = free_empty_sys_acl(conn, def_acl); } -- cgit