Revert 18883 and 18912, as they break named pipes
[reactos.git] / reactos / lib / kernel32 / file / pipe.c
index efabbd2..f5e65d5 100644 (file)
@@ -59,9 +59,6 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
          Attributes |= OBJ_INHERIT;
      }
 
-   /* use default buffer size if desired */
-   if (nSize == 0) nSize = 0x1000;
-
    InitializeObjectAttributes(&ObjectAttributes,
                              &PipeName,
                              Attributes,
@@ -69,7 +66,7 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
                              SecurityDescriptor);
 
    Status = NtCreateNamedPipeFile(&ReadPipeHandle,
-                                 FILE_GENERIC_READ | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE,
+                                 FILE_GENERIC_READ,
                                  &ObjectAttributes,
                                  &StatusBlock,
                                  FILE_SHARE_READ | FILE_SHARE_WRITE,
@@ -89,10 +86,10 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
      }
 
    Status = NtOpenFile(&WritePipeHandle,
-                      FILE_GENERIC_WRITE | SYNCHRONIZE,
+                      FILE_GENERIC_WRITE,
                       &ObjectAttributes,
                       &StatusBlock,
-                      FILE_SHARE_READ | FILE_SHARE_WRITE,
+                      0,
                       FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE);
    if (!NT_SUCCESS(Status))
      {