summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-03-01 17:25:25 -0800
committerRalph Boehme <slow@samba.org>2016-03-03 09:04:14 +0100
commit8e88b9783dec751fe5bd4750923b62b978080885 (patch)
tree82bc4c83f0361d933d5480aa7ebc1cdd440faa22 /source3/modules/vfs_default.c
parentac8fba6ef7093836eb6988e749325b69e7a7fde1 (diff)
downloadsamba-8e88b9783dec751fe5bd4750923b62b978080885.tar.gz
VFS: Modify chmod_acl to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r--source3/modules/vfs_default.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index fbb0bcb806f..bb55facbb08 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -498,8 +498,10 @@ static int vfswrap_mkdir(vfs_handle_struct *handle,
* mess up any inherited ACL bits that were set. JRA.
*/
int saved_errno = errno; /* We may get ENOSYS */
- if ((SMB_VFS_CHMOD_ACL(handle->conn, path, mode) == -1) && (errno == ENOSYS))
+ if ((SMB_VFS_CHMOD_ACL(handle->conn, smb_fname, mode) == -1) &&
+ (errno == ENOSYS)) {
errno = saved_errno;
+ }
}
END_PROFILE(syscall_mkdir);
@@ -1694,7 +1696,7 @@ static int vfswrap_chmod(vfs_handle_struct *handle,
{
int saved_errno = errno; /* We might get ENOSYS */
result = SMB_VFS_CHMOD_ACL(handle->conn,
- smb_fname->base_name,
+ smb_fname,
mode);
if (result == 0) {
END_PROFILE(syscall_chmod);
@@ -2362,7 +2364,9 @@ static NTSTATUS vfswrap_audit_file(struct vfs_handle_struct *handle,
return NT_STATUS_OK; /* Nothing to do here ... */
}
-static int vfswrap_chmod_acl(vfs_handle_struct *handle, const char *name, mode_t mode)
+static int vfswrap_chmod_acl(vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname,
+ mode_t mode)
{
#ifdef HAVE_NO_ACL
errno = ENOSYS;
@@ -2371,7 +2375,7 @@ static int vfswrap_chmod_acl(vfs_handle_struct *handle, const char *name, mode_t
int result;
START_PROFILE(chmod_acl);
- result = chmod_acl(handle->conn, name, mode);
+ result = chmod_acl(handle->conn, smb_fname->base_name, mode);
END_PROFILE(chmod_acl);
return result;
#endif