]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: call vfs_stat() in mkdir_internal()
authorRalph Boehme <slow@samba.org>
Tue, 12 Jan 2021 11:03:33 +0000 (12:03 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 14 Jan 2021 17:55:33 +0000 (17:55 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 8846140e4fd547ba3c599c91ee84b8d374e3d36e..dbae6d85851633d8a7f5839b8505090d069f13e9 100644 (file)
@@ -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;