summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_cap.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/modules/vfs_cap.c
parenta4d1f2223abdb0db2a15742ebd59a611cc157443 (diff)
downloadsamba-9158974540d0e311021f04789ed75ebda466c5b3.tar.gz
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/modules/vfs_cap.c')
-rw-r--r--source3/modules/vfs_cap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 2454e12b6fa..f2f8d7174f1 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -409,7 +409,9 @@ static int cap_chmod_acl(vfs_handle_struct *handle, const char *path, mode_t mod
return SMB_VFS_NEXT_CHMOD_ACL(handle, cappath, mode);
}
-static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle, const char *path, SMB_ACL_TYPE_T type)
+static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle,
+ const char *path, SMB_ACL_TYPE_T type,
+ TALLOC_CTX *mem_ctx)
{
char *cappath = capencode(talloc_tos(), path);
@@ -417,7 +419,7 @@ static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle, const char *pat
errno = ENOMEM;
return (SMB_ACL_T)NULL;
}
- return SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, cappath, type);
+ return SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, cappath, type, mem_ctx);
}
static int cap_sys_acl_set_file(vfs_handle_struct *handle, const char *path, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)