mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Create named pipes with security information if argument is present
svn path=/trunk/; revision=11243
This commit is contained in:
parent
d0953a3d80
commit
6712cd665f
1 changed files with 13 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: npipe.c,v 1.19 2004/10/08 21:25:18 weiden Exp $
|
||||
/* $Id: npipe.c,v 1.20 2004/10/08 23:24:01 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -77,8 +77,9 @@ CreateNamedPipeW(LPCWSTR lpName,
|
|||
BOOLEAN ReadModeMessage;
|
||||
BOOLEAN NonBlocking;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
ULONG ShareAccess;
|
||||
ULONG ShareAccess, Attributes;
|
||||
LARGE_INTEGER DefaultTimeOut;
|
||||
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
|
||||
|
||||
Result = RtlDosPathNameToNtPathName_U((LPWSTR)lpName,
|
||||
&NamedPipeName,
|
||||
|
@ -93,11 +94,19 @@ CreateNamedPipeW(LPCWSTR lpName,
|
|||
DPRINT("Pipe name: %wZ\n", &NamedPipeName);
|
||||
DPRINT("Pipe name: %S\n", NamedPipeName.Buffer);
|
||||
|
||||
Attributes = OBJ_CASE_INSENSITIVE;
|
||||
if(lpSecurityAttributes)
|
||||
{
|
||||
SecurityDescriptor = lpSecurityAttributes->lpSecurityDescriptor;
|
||||
if(lpSecurityAttributes->bInheritHandle)
|
||||
Attributes |= OBJ_INHERIT;
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&NamedPipeName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
Attributes,
|
||||
NULL,
|
||||
NULL);
|
||||
SecurityDescriptor);
|
||||
|
||||
DesiredAccess = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue