From: Ralph Boehme Date: Mon, 14 Dec 2020 14:43:39 +0000 (+0100) Subject: vfs_glusterfs: support real dirfsps in vfs_gluster_mkdirat() X-Git-Tag: samba-4.14.0rc1~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=640629b21ba95148e81c5473f0bfb8ab45a27752;p=thirdparty%2Fsamba.git vfs_glusterfs: support real dirfsps in vfs_gluster_mkdirat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index b5896feefbd..63499b1213b 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -714,11 +714,22 @@ static int vfs_gluster_mkdirat(struct vfs_handle_struct *handle, const struct smb_filename *smb_fname, mode_t mode) { + struct smb_filename *full_fname = NULL; int ret; START_PROFILE(syscall_mkdirat); - SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp); - ret = glfs_mkdir(handle->data, smb_fname->base_name, mode); + + full_fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (full_fname == NULL) { + return -1; + } + + ret = glfs_mkdir(handle->data, full_fname->base_name, mode); + + TALLOC_FREE(full_fname); + END_PROFILE(syscall_mkdirat); return ret;