From: Ralph Boehme Date: Wed, 20 Jan 2021 14:02:54 +0000 (+0100) Subject: vfs_media_harmony: support real dirfsps in mh_unlinkat() X-Git-Tag: tevent-0.11.0~1938 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e8137480e92ae45a6d2dcba98933df480bbef91;p=thirdparty%2Fsamba.git vfs_media_harmony: support real dirfsps in mh_unlinkat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index ecf8b49ccf3..307d7afa963 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -1436,6 +1436,7 @@ static int mh_unlinkat(vfs_handle_struct *handle, int flags) { int status; + struct smb_filename *full_fname = NULL; struct smb_filename *clientFname; TALLOC_CTX *ctx; @@ -1451,17 +1452,25 @@ static int mh_unlinkat(vfs_handle_struct *handle, clientFname = NULL; ctx = talloc_tos(); + full_fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (full_fname == NULL) { + return -1; + } + if ((status = alloc_get_client_smb_fname(handle, ctx, - smb_fname, + full_fname, &clientFname))) { goto err; } status = SMB_VFS_NEXT_UNLINKAT(handle, - dirfsp, + dirfsp->conn->cwd_fsp, clientFname, flags); err: + TALLOC_FREE(full_fname); TALLOC_FREE(clientFname); out: return status;