From 71a614861a50a7b8cfb568eca092f86b982274f9 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 14 Dec 2020 15:49:15 +0100 Subject: [PATCH] vfs_linux_xfs_sgid: support real dirfsps in linux_xfs_sgid_mkdirat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_linux_xfs_sgid.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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", -- 2.47.2