mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
don't ask for generic read access rights in WaitNamedPipe
svn path=/trunk/; revision=18915
This commit is contained in:
parent
eea652f412
commit
52e523d86c
1 changed files with 9 additions and 16 deletions
|
@ -128,22 +128,15 @@ CreateNamedPipeW(LPCWSTR lpName,
|
||||||
if (!(dwOpenMode & FILE_FLAG_OVERLAPPED))
|
if (!(dwOpenMode & FILE_FLAG_OVERLAPPED))
|
||||||
CreateOptions |= FILE_SYNCHRONOUS_IO_NONALERT;
|
CreateOptions |= FILE_SYNCHRONOUS_IO_NONALERT;
|
||||||
|
|
||||||
switch (dwOpenMode & PIPE_ACCESS_DUPLEX)
|
if (dwOpenMode & PIPE_ACCESS_INBOUND)
|
||||||
{
|
{
|
||||||
case PIPE_ACCESS_INBOUND:
|
ShareAccess |= FILE_SHARE_WRITE;
|
||||||
ShareAccess |= FILE_SHARE_WRITE;
|
DesiredAccess |= GENERIC_READ;
|
||||||
DesiredAccess |= GENERIC_READ;
|
}
|
||||||
break;
|
if (dwOpenMode & PIPE_ACCESS_OUTBOUND)
|
||||||
|
{
|
||||||
case PIPE_ACCESS_OUTBOUND:
|
ShareAccess |= FILE_SHARE_READ;
|
||||||
ShareAccess |= FILE_SHARE_READ;
|
DesiredAccess |= GENERIC_WRITE;
|
||||||
DesiredAccess |= GENERIC_WRITE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PIPE_ACCESS_DUPLEX:
|
|
||||||
ShareAccess |= FILE_SHARE_READ | FILE_SHARE_WRITE;
|
|
||||||
DesiredAccess |= GENERIC_READ | GENERIC_WRITE;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwPipeMode & PIPE_TYPE_MESSAGE)
|
if (dwPipeMode & PIPE_TYPE_MESSAGE)
|
||||||
|
@ -243,7 +236,7 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
Status = NtOpenFile(&FileHandle,
|
Status = NtOpenFile(&FileHandle,
|
||||||
FILE_GENERIC_READ,
|
FILE_READ_ATTRIBUTES | SYNCHRONIZE,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&Iosb,
|
&Iosb,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
|
|
Loading…
Reference in a new issue