https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1d777ffab5458495c04f250cf7ced379f306a7af

commit 1d777ffab5458495c04f250cf7ced379f306a7af
Author: Pierre Schweitzer <pie...@reactos.org>
AuthorDate: Sun Nov 12 22:33:58 2017 +0100

    [NTOSKNRL] In NtWriteFile, remove the check that is now redundant with 
ObReferenceFileObjectForWrite().
    CORE-14003
---
 ntoskrnl/io/iomgr/iofunc.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c
index 9ab983ac21..46fcce201d 100644
--- a/ntoskrnl/io/iomgr/iofunc.c
+++ b/ntoskrnl/io/iomgr/iofunc.c
@@ -3511,21 +3511,6 @@ NtWriteFile(IN HANDLE FileHandle,
     {
         _SEH2_TRY
         {
-            /*
-             * Check if the handle has either FILE_WRITE_DATA or
-             * FILE_APPEND_DATA granted. However, if this is a named pipe,
-             * make sure we don't ask for FILE_APPEND_DATA as it interferes
-             * with the FILE_CREATE_PIPE_INSTANCE access right!
-             */
-            if (!(ObjectHandleInfo.GrantedAccess &
-                 ((!(FileObject->Flags & FO_NAMED_PIPE) ?
-                   FILE_APPEND_DATA : 0) | FILE_WRITE_DATA)))
-            {
-                /* We failed */
-                ObDereferenceObject(FileObject);
-                _SEH2_YIELD(return STATUS_ACCESS_DENIED);
-            }
-
             /* Probe the status block */
             ProbeForWriteIoStatusBlock(IoStatusBlock);
 

Reply via email to