Added handling for lpSecurityAttributes (for inheritable handles) in CreateFileW.

svn path=/trunk/; revision=2919
This commit is contained in:
Hartmut Birr 2002-05-07 22:21:02 +00:00
parent b5d90aa2e5
commit 8aa6e0e7f6

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.23 2002/04/27 19:13:15 hbirr Exp $
/* $Id: create.c,v 1.24 2002/05/07 22:21:02 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -132,6 +132,13 @@ HANDLE STDCALL CreateFileW (LPCWSTR lpFileName,
ObjectAttributes.SecurityDescriptor = NULL;
ObjectAttributes.SecurityQualityOfService = NULL;
if (lpSecurityAttributes)
{
if(lpSecurityAttributes->bInheritHandle)
ObjectAttributes.Attributes |= OBJ_INHERIT;
ObjectAttributes.SecurityDescriptor = lpSecurityAttributes->lpSecurityDescriptor;
}
Status = NtCreateFile (&FileHandle,
dwDesiredAccess,
&ObjectAttributes,