diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-10-10 10:18:32 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-10-11 12:25:11 +1100 |
commit | 9158974540d0e311021f04789ed75ebda466c5b3 (patch) | |
tree | 5cdc75d2c7527e94df2bb9292d276cbf8e36499a /source3/modules/vfs_solarisacl.c | |
parent | a4d1f2223abdb0db2a15742ebd59a611cc157443 (diff) | |
download | samba-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/modules/vfs_solarisacl.c')
-rw-r--r-- | source3/modules/vfs_solarisacl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c index 10b6f707d7..ad25e88f62 100644 --- a/source3/modules/vfs_solarisacl.c +++ b/source3/modules/vfs_solarisacl.c @@ -45,7 +45,7 @@ static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl, SOLARIS_ACL_T *solariacl, int *count, SMB_ACL_TYPE_T type); static SMB_ACL_T solaris_acl_to_smb_acl(SOLARIS_ACL_T solarisacl, int count, - SMB_ACL_TYPE_T type); + SMB_ACL_TYPE_T type, TALLOC_CTX *mem_ctx); static SOLARIS_ACL_TAG_T smb_tag_to_solaris_tag(SMB_ACL_TAG_T smb_tag); static SMB_ACL_TAG_T solaris_tag_to_smb_tag(SOLARIS_ACL_TAG_T solaris_tag); static bool solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count, @@ -64,7 +64,7 @@ static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count); SMB_ACL_T solarisacl_sys_acl_get_file(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 result = NULL; int count; @@ -85,7 +85,7 @@ SMB_ACL_T solarisacl_sys_acl_get_file(vfs_handle_struct *handle, if (!solaris_acl_get_file(path_p, &solaris_acl, &count)) { goto done; } - result = solaris_acl_to_smb_acl(solaris_acl, count, type); + result = solaris_acl_to_smb_acl(solaris_acl, count, type, mem_ctx); if (result == NULL) { DEBUG(10, ("conversion solaris_acl -> smb_acl failed (%s).\n", strerror(errno))); @@ -103,7 +103,7 @@ SMB_ACL_T solarisacl_sys_acl_get_file(vfs_handle_struct *handle, * get the access ACL of a file referred to by a fd */ SMB_ACL_T solarisacl_sys_acl_get_fd(vfs_handle_struct *handle, - files_struct *fsp) + files_struct *fsp, TALLOC_CTX *mem_ctx) { SMB_ACL_T result = NULL; int count; @@ -424,12 +424,12 @@ static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl, * soaris acl to the SMB_ACL format. */ static SMB_ACL_T solaris_acl_to_smb_acl(SOLARIS_ACL_T solaris_acl, int count, - SMB_ACL_TYPE_T type) + SMB_ACL_TYPE_T type, TALLOC_CTX *mem_ctx) { SMB_ACL_T result; int i; - if ((result = sys_acl_init()) == NULL) { + if ((result = sys_acl_init(mem_ctx)) == NULL) { DEBUG(10, ("error allocating memory for SMB_ACL\n")); goto fail; } |