From 875fd6eec256c195f7bbb56fc1dd7e22cdfeff04 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 14 Dec 2020 15:35:22 +0100 Subject: [PATCH] vfs_media_harmony: support real dirfsps in mh_mkdirat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_media_harmony.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index 79fc595339e..33b7b0840c2 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -997,6 +997,7 @@ static int mh_mkdirat(vfs_handle_struct *handle, int status; struct smb_filename *clientFname = NULL; const char *path = smb_fname->base_name; + struct smb_filename *full_fname = NULL; DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path)); @@ -1008,19 +1009,27 @@ static int mh_mkdirat(vfs_handle_struct *handle, goto out; } + full_fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (full_fname == NULL) { + return -1; + } + status = alloc_get_client_smb_fname(handle, talloc_tos(), - smb_fname, + full_fname, &clientFname); if (status != 0) { goto err; } status = SMB_VFS_NEXT_MKDIRAT(handle, - dirfsp, + handle->conn->cwd_fsp, clientFname, mode); err: + TALLOC_FREE(full_fname); TALLOC_FREE(clientFname); out: DEBUG(MH_INFO_DEBUG, ("Leaving with path '%s'\n", path)); -- 2.47.2