Fixed backwards access check that was causing NtWriteFile to fail when
given a read only buffer
Modified: trunk/reactos/ntoskrnl/io/irp.c
_____
Modified: trunk/reactos/ntoskrnl/io/irp.c
--- trunk/reactos/ntoskrnl/io/irp.c 2005-05-09 22:05:47 UTC (rev
15193)
+++ trunk/reactos/ntoskrnl/io/irp.c 2005-05-09 22:12:43 UTC (rev
15194)
@@ -472,14 +472,14 @@
/* Use an MDL for Direct I/O */
Irp->MdlAddress = MmCreateMdl(NULL, Buffer, Length);
- /* Use the right Access Type */
+
if (MajorFunction == IRP_MJ_READ)
{
- AccessType = IoReadAccess;
+ AccessType = IoWriteAccess;
}
else
{
- AccessType = IoWriteAccess;
+ AccessType = IoReadAccess;
}
/* Probe and Lock */
Show replies by date