diff options
author | Jeremy Allison <jra@samba.org> | 2016-03-01 17:25:25 -0800 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2016-03-03 09:04:14 +0100 |
commit | 8e88b9783dec751fe5bd4750923b62b978080885 (patch) | |
tree | 82bc4c83f0361d933d5480aa7ebc1cdd440faa22 /source3/modules/vfs_unityed_media.c | |
parent | ac8fba6ef7093836eb6988e749325b69e7a7fde1 (diff) | |
download | samba-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_unityed_media.c')
-rw-r--r-- | source3/modules/vfs_unityed_media.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index 65e4d4cbbcd..dd6dc335dd8 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -1571,28 +1571,32 @@ err: } static int um_chmod_acl(vfs_handle_struct *handle, - const char *path, + const struct smb_filename *smb_fname, mode_t mode) { int status; - char *client_path = NULL; + int saved_errno; + struct smb_filename *client_fname = NULL; DEBUG(10, ("Entering um_chmod_acl\n")); - if (!is_in_media_files(path)) { - return SMB_VFS_NEXT_CHMOD_ACL(handle, path, mode); + if (!is_in_media_files(smb_fname->base_name)) { + return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode); } - status = alloc_get_client_path(handle, talloc_tos(), - path, &client_path); + status = alloc_get_client_smb_fname(handle, + talloc_tos(), + smb_fname, + &client_fname); if (status != 0) { goto err; } - - status = SMB_VFS_NEXT_CHMOD_ACL(handle, client_path, mode); + status = SMB_VFS_NEXT_CHMOD_ACL(handle, client_fname, mode); err: - TALLOC_FREE(client_path); + saved_errno = errno; + TALLOC_FREE(client_fname); + errno = saved_errno; return status; } |