From: Ralph Boehme Date: Tue, 12 Jan 2021 11:03:33 +0000 (+0100) Subject: smbd: call vfs_stat() in mkdir_internal() X-Git-Tag: samba-4.14.0rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1726b8e22d1fc60c8409b5498bf59940d5a49ec;p=thirdparty%2Fsamba.git smbd: call vfs_stat() in mkdir_internal() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8846140e4fd..dbae6d85851 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4298,6 +4298,12 @@ static NTSTATUS mkdir_internal(connection_struct *conn, return NT_STATUS_NO_MEMORY; } + ret = vfs_stat(conn, parent_dir_fname); + if (ret == -1) { + TALLOC_FREE(parent_dir_fname); + return map_nt_error_from_unix(errno); + } + status = openat_pathref_fsp(conn->cwd_fsp, parent_dir_fname); if (!NT_STATUS_IS_OK(status)) { return status;