From 3abc2dbdf14a414bdb51f804ce4e1194670c15bb Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 4 Jan 2016 14:09:27 -0800 Subject: [PATCH] dll: FspAccessCheck --- src/dll/access.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/dll/access.c b/src/dll/access.c index 0a566d6f..fed7a3e5 100644 --- a/src/dll/access.c +++ b/src/dll/access.c @@ -120,6 +120,15 @@ FSP_API NTSTATUS FspAccessCheck(FSP_FILE_SYSTEM *FileSystem, if (0 == (FileAttributes && FILE_ATTRIBUTE_DIRECTORY)) return STATUS_NOT_A_DIRECTORY; } + else + { + if ((Request->Req.Create.CreateOptions & FILE_DIRECTORY_FILE) && + 0 == (FileAttributes && FILE_ATTRIBUTE_DIRECTORY)) + return STATUS_NOT_A_DIRECTORY; + if ((Request->Req.Create.CreateOptions & FILE_NON_DIRECTORY_FILE) && + 0 != (FileAttributes && FILE_ATTRIBUTE_DIRECTORY)) + return STATUS_NOT_A_DIRECTORY; + } if (0 != (FileAttributes && FILE_ATTRIBUTE_READONLY)) {