summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_media_harmony.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-03-01 16:20:25 -0800
committerRalph Boehme <slow@samba.org>2016-03-03 09:04:14 +0100
commitac8fba6ef7093836eb6988e749325b69e7a7fde1 (patch)
tree576c296d7bc49192f7cb333f034d4721f075b261 /source3/modules/vfs_media_harmony.c
parentd7ca174744001fabdc32e1c334dad347bb985756 (diff)
downloadsamba-ac8fba6ef7093836eb6988e749325b69e7a7fde1.tar.gz
VFS: Modify chmod 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_media_harmony.c')
-rw-r--r--source3/modules/vfs_media_harmony.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index 786cee9288e..6a54862bf2a 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -1547,33 +1547,30 @@ out:
* Failure: set errno, return -1
*/
static int mh_chmod(vfs_handle_struct *handle,
- const char *path,
+ const struct smb_filename *smb_fname,
mode_t mode)
{
int status;
- char *clientPath;
- TALLOC_CTX *ctx;
+ struct smb_filename *clientFname = NULL;
DEBUG(MH_INFO_DEBUG, ("Entering mh_chmod\n"));
- if (!is_in_media_files(path))
+ if (!is_in_media_files(smb_fname->base_name))
{
- status = SMB_VFS_NEXT_CHMOD(handle, path, mode);
+ status = SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode);
goto out;
}
- clientPath = NULL;
- ctx = talloc_tos();
-
- if ((status = alloc_get_client_path(handle, ctx,
- path,
- &clientPath)))
- {
+ status = alloc_get_client_smb_fname(handle,
+ talloc_tos(),
+ smb_fname,
+ &clientFname);
+ if (status != 0) {
goto err;
}
- status = SMB_VFS_NEXT_CHMOD(handle, clientPath, mode);
+ status = SMB_VFS_NEXT_CHMOD(handle, clientFname, mode);
err:
- TALLOC_FREE(clientPath);
+ TALLOC_FREE(clientFname);
out:
return status;
}