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/include/vfs.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'source3/include/vfs.h') diff --git a/source3/include/vfs.h b/source3/include/vfs.h index c83e7ed54b..4ba11be94e 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -692,8 +692,13 @@ struct vfs_fn_pointers { int (*chmod_acl_fn)(struct vfs_handle_struct *handle, const char *name, mode_t mode); int (*fchmod_acl_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode); - SMB_ACL_T (*sys_acl_get_file_fn)(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type); - SMB_ACL_T (*sys_acl_get_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp); + SMB_ACL_T (*sys_acl_get_file_fn)(struct vfs_handle_struct *handle, + const char *path_p, + SMB_ACL_TYPE_T type, + TALLOC_CTX *mem_ctx); + SMB_ACL_T (*sys_acl_get_fd_fn)(struct vfs_handle_struct *handle, + struct files_struct *fsp, + TALLOC_CTX *mem_ctx); int (*sys_acl_blob_get_file_fn)(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob); @@ -1094,9 +1099,11 @@ int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode); SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle, const char *path_p, - SMB_ACL_TYPE_T type); + SMB_ACL_TYPE_T type, + TALLOC_CTX *mem_ctx); SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle, - struct files_struct *fsp); + struct files_struct *fsp, + TALLOC_CTX *mem_ctx); int smb_vfs_call_sys_acl_blob_get_file(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type, -- cgit