summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-10-10 10:18:32 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-10-11 12:25:11 +1100
commit9158974540d0e311021f04789ed75ebda466c5b3 (patch)
tree5cdc75d2c7527e94df2bb9292d276cbf8e36499a /source3/smbd/trans2.c
parenta4d1f2223abdb0db2a15742ebd59a611cc157443 (diff)
downloadsamba-9158974540d0e311021f04789ed75ebda466c5b3.tar.gz
samba-9158974540d0e311021f04789ed75ebda466c5b3.tar.bz2
samba-9158974540d0e311021f04789ed75ebda466c5b3.zip
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
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c12
1 files changed, 8 insertions, 4 deletions
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);
}