[NTOSKRNL] Add a FIXME in NtWriteFile() that explains how broken is our current imple...
authorPierre Schweitzer <pierre@reactos.org>
Sun, 12 Nov 2017 20:11:22 +0000 (21:11 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 12 Nov 2017 20:11:22 +0000 (21:11 +0100)
ntoskrnl/io/iomgr/iofunc.c

index 5aa67ee..93f1fe4 100644 (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,