From: Ralph Boehme Date: Mon, 14 Dec 2020 14:49:15 +0000 (+0100) Subject: vfs_linux_xfs_sgid: support real dirfsps in linux_xfs_sgid_mkdirat() X-Git-Tag: samba-4.14.0rc1~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71a614861a50a7b8cfb568eca092f86b982274f9;p=thirdparty%2Fsamba.git vfs_linux_xfs_sgid: support real dirfsps in linux_xfs_sgid_mkdirat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_linux_xfs_sgid.c b/source3/modules/vfs_linux_xfs_sgid.c index f112f119fae..e55734f806f 100644 --- a/source3/modules/vfs_linux_xfs_sgid.c +++ b/source3/modules/vfs_linux_xfs_sgid.c @@ -46,7 +46,14 @@ static int linux_xfs_sgid_mkdirat(vfs_handle_struct *handle, return mkdir_res; } - ok = parent_smb_fname(talloc_tos(), smb_fname, &dname, NULL); + fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (fname == NULL) { + return -1; + } + + ok = parent_smb_fname(talloc_tos(), fname, &dname, NULL); if (!ok) { DBG_WARNING("parent_smb_fname() failed\n"); /* return success, we did the mkdir */ @@ -69,13 +76,6 @@ static int linux_xfs_sgid_mkdirat(vfs_handle_struct *handle, } TALLOC_FREE(dname); - fname = cp_smb_filename(talloc_tos(), smb_fname); - if (fname == NULL) { - DBG_WARNING("cp_smb_filename() failed\n"); - /* return success, we did the mkdir */ - return mkdir_res; - } - res = SMB_VFS_NEXT_STAT(handle, fname); if (res == -1) { DBG_NOTICE("Could not stat just created dir %s: %s\n",