mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
CreatePipe(): Don't open client side in passive mode.
svn path=/trunk/; revision=12702
This commit is contained in:
parent
4cffccfe6f
commit
9e8add4928
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: pipe.c,v 1.12 2004/10/08 23:12:29 weiden Exp $
|
/* $Id$
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -37,7 +37,8 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
HANDLE ReadPipeHandle;
|
HANDLE ReadPipeHandle;
|
||||||
HANDLE WritePipeHandle;
|
HANDLE WritePipeHandle;
|
||||||
ULONG PipeId, Attributes;
|
ULONG PipeId;
|
||||||
|
ULONG Attributes;
|
||||||
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
|
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
|
||||||
|
|
||||||
DefaultTimeout.QuadPart = 300000000; /* 30 seconds */
|
DefaultTimeout.QuadPart = 300000000; /* 30 seconds */
|
||||||
|
@ -54,8 +55,8 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
|
||||||
if (lpPipeAttributes)
|
if (lpPipeAttributes)
|
||||||
{
|
{
|
||||||
SecurityDescriptor = lpPipeAttributes->lpSecurityDescriptor;
|
SecurityDescriptor = lpPipeAttributes->lpSecurityDescriptor;
|
||||||
if(lpPipeAttributes->bInheritHandle)
|
if (lpPipeAttributes->bInheritHandle)
|
||||||
Attributes |= OBJ_INHERIT;
|
Attributes |= OBJ_INHERIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
@ -88,7 +89,7 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
|
||||||
FILE_GENERIC_WRITE,
|
FILE_GENERIC_WRITE,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&StatusBlock,
|
&StatusBlock,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
0,
|
||||||
FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE);
|
FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue