summaryrefslogtreecommitdiffstats
path: root/source3/include/vfs_macros.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-10-10 11:50:27 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-10-11 12:25:11 +1100
commitc8ade07760ae0ccfdf2d875c9f3027926e62321b (patch)
treeabac36ce81b1e0737bfeb607699a41773beb958e /source3/include/vfs_macros.h
parent9158974540d0e311021f04789ed75ebda466c5b3 (diff)
downloadsamba-c8ade07760ae0ccfdf2d875c9f3027926e62321b.tar.gz
samba-c8ade07760ae0ccfdf2d875c9f3027926e62321b.tar.xz
samba-c8ade07760ae0ccfdf2d875c9f3027926e62321b.zip
smbd: Add mem_ctx to {f,}get_nt_acl VFS call
This makes it clear which context the returned SD is allocated on, as a number of callers do not want it on talloc_tos(). As the ACL transformation allocates and then no longer needs a great deal of memory, a talloc_stackframe() call is used to contain the memory that is not returned further up the stack. Andrew Bartlett
Diffstat (limited to 'source3/include/vfs_macros.h')
-rw-r--r--source3/include/vfs_macros.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index f1bc8ffa4c..a5ff90bc9d 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -399,15 +399,15 @@
#define SMB_VFS_NEXT_FSCTL(handle, fsp, ctx, function, req_flags, in_data, in_len, out_data, max_out_len, out_len) \
smb_vfs_call_fsctl((handle)->next, (fsp), (ctx), (function), (req_flags), (in_data), (in_len), (out_data), (max_out_len), (out_len))
-#define SMB_VFS_FGET_NT_ACL(fsp, security_info, ppdesc) \
- smb_vfs_call_fget_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info), (ppdesc))
-#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) \
- smb_vfs_call_fget_nt_acl((handle)->next, (fsp), (security_info), (ppdesc))
-
-#define SMB_VFS_GET_NT_ACL(conn, name, security_info, ppdesc) \
- smb_vfs_call_get_nt_acl((conn)->vfs_handles, (name), (security_info), (ppdesc))
-#define SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, ppdesc) \
- smb_vfs_call_get_nt_acl((handle)->next, (name), (security_info), (ppdesc))
+#define SMB_VFS_FGET_NT_ACL(fsp, security_info, mem_ctx, ppdesc) \
+ smb_vfs_call_fget_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info), (mem_ctx), (ppdesc))
+#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, mem_ctx, ppdesc) \
+ smb_vfs_call_fget_nt_acl((handle)->next, (fsp), (security_info), (mem_ctx), (ppdesc))
+
+#define SMB_VFS_GET_NT_ACL(conn, name, security_info, mem_ctx, ppdesc) \
+ smb_vfs_call_get_nt_acl((conn)->vfs_handles, (name), (security_info), (mem_ctx), (ppdesc))
+#define SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, mem_ctx, ppdesc) \
+ smb_vfs_call_get_nt_acl((handle)->next, (name), (security_info), (mem_ctx), (ppdesc))
#define SMB_VFS_AUDIT_FILE(conn, name, sacl, access_requested, access_denied) \
smb_vfs_call_audit_file((conn)->vfs_handles, (name), (sacl), (access_requested), (access_denied))