mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Create mail slots with security information if argument is present
svn path=/trunk/; revision=11242
This commit is contained in:
parent
a30f6d7c94
commit
d0953a3d80
1 changed files with 12 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mailslot.c,v 1.11 2004/06/13 20:04:55 navaraf Exp $
|
||||
/* $Id: mailslot.c,v 1.12 2004/10/08 23:20:57 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -60,6 +60,8 @@ CreateMailslotW(LPCWSTR lpName,
|
|||
BOOLEAN Result;
|
||||
LARGE_INTEGER DefaultTimeOut;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
ULONG Attributes = OBJ_CASE_INSENSITIVE;
|
||||
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
|
||||
|
||||
Result = RtlDosPathNameToNtPathName_U((LPWSTR)lpName,
|
||||
&MailslotName,
|
||||
|
@ -73,11 +75,18 @@ CreateMailslotW(LPCWSTR lpName,
|
|||
|
||||
DPRINT("Mailslot name: %wZ\n", &MailslotName);
|
||||
|
||||
if(lpSecurityAttributes)
|
||||
{
|
||||
SecurityDescriptor = lpSecurityAttributes->lpSecurityDescriptor;
|
||||
if(lpSecurityAttributes->bInheritHandle)
|
||||
Attributes |= OBJ_INHERIT;
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&MailslotName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
Attributes,
|
||||
NULL,
|
||||
NULL);
|
||||
SecurityDescriptor);
|
||||
|
||||
DefaultTimeOut.QuadPart = lReadTimeout * 10000;
|
||||
|
||||
|
|
Loading…
Reference in a new issue