[NTOSKRNL] Don't need all access for file object
authorPierre Schweitzer <pierre@reactos.org>
Thu, 16 Aug 2018 16:54:23 +0000 (18:54 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Thu, 16 Aug 2018 16:54:23 +0000 (18:54 +0200)
ntoskrnl/mm/pagefile.c

index 14c558e..9855578 100644 (file)
@@ -715,7 +715,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
     }
 
     Status = ObReferenceObjectByHandle(FileHandle,
-                                       FILE_ALL_ACCESS,
+                                       FILE_READ_DATA | FILE_WRITE_DATA,
                                        IoFileObjectType,
                                        KernelMode,
                                        (PVOID*)&FileObject,