NTFileSystemHelper: Return STATUS_OBJECT_PATH_INVALID when FILE_DIRECTORY_FILE is specified and a path component is not a directory

This commit is contained in:
Tal Aloni 2017-02-11 10:52:14 +02:00
parent a23d2d86f9
commit 7c107344a2

View file

@ -58,7 +58,7 @@ namespace SMBLibrary.Server
entry = null;
return status;
}
if (createDisposition == CreateDisposition.FILE_OPEN)
{
if (entry == null)
@ -74,8 +74,7 @@ namespace SMBLibrary.Server
if (!entry.IsDirectory && forceDirectory)
{
// Not sure if that's the correct response
return NTStatus.STATUS_OBJECT_NAME_COLLISION;
return NTStatus.STATUS_OBJECT_PATH_INVALID;
}
}
else if (createDisposition == CreateDisposition.FILE_CREATE)