diff options
author | Jeremy Allison <jra@samba.org> | 2016-02-23 13:14:03 -0800 |
---|---|---|
committer | Uri Simchoni <uri@samba.org> | 2016-02-24 16:05:55 +0100 |
commit | 873df9a8a5508a3a4f51dfe447a5ffcdf18bab09 (patch) | |
tree | aa8516d7133a30fd2e353eaad9cefc0c695b2f83 /source3/modules/vfs_media_harmony.c | |
parent | d7f552cbbd173db941ef752fb70609eb1b0d0e70 (diff) | |
download | samba-873df9a8a5508a3a4f51dfe447a5ffcdf18bab09.tar.gz |
s3: VFS: Modify mkdir to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().
Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8
(synthetic_smb_fname()) to cope with modules that
modify the incoming pathname.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Feb 24 16:05:55 CET 2016 on sn-devel-144
Diffstat (limited to 'source3/modules/vfs_media_harmony.c')
-rw-r--r-- | source3/modules/vfs_media_harmony.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index 65673e17fa4..594db83f311 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -1033,35 +1033,32 @@ static void mh_rewinddir(vfs_handle_struct *handle, * Failure: set errno, return -1 */ static int mh_mkdir(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; + const char *path = smb_fname->base_name; DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path)); if (!is_in_media_files(path)) { - status = SMB_VFS_NEXT_MKDIR(handle, path, mode); + status = SMB_VFS_NEXT_MKDIR(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_MKDIR(handle, clientPath, mode); + status = SMB_VFS_NEXT_MKDIR(handle, clientFname, mode); err: - TALLOC_FREE(clientPath); + TALLOC_FREE(clientFname); out: DEBUG(MH_INFO_DEBUG, ("Leaving with path '%s'\n", path)); return status; |