[NTOSKRNL] Add a FIXME in NtWriteFile() that explains how broken is our current implementation regarding read-only FSDs

This commit is contained in:
Pierre Schweitzer 2017-11-12 21:11:22 +01:00
parent cbf0430b56
commit 1bef48796e
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -3499,7 +3499,13 @@ NtWriteFile(IN HANDLE FileHandle,
CapturedByteOffset.QuadPart = 0;
IOTRACE(IO_API_DEBUG, "FileHandle: %p\n", FileHandle);
/* Get File Object */
/* Get File Object
* FIXME: We should call ObReferenceFileObjectForWrite() instead to
* check whether write access was actually granted. If not it will
* fail and we will return.
* That would allow avoiding ASSERT on FastIO later on if the FSD
* is read-only
*/
Status = ObReferenceObjectByHandle(FileHandle,
0,
IoFileObjectType,