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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -131,6 +131,13 @@ HANDLE STDCALL CreateFileW (LPCWSTR lpFileName,
ObjectAttributes.Attributes = OBJ_CASE_INSENSITIVE; ObjectAttributes.Attributes = OBJ_CASE_INSENSITIVE;
ObjectAttributes.SecurityDescriptor = NULL; ObjectAttributes.SecurityDescriptor = NULL;
ObjectAttributes.SecurityQualityOfService = NULL; ObjectAttributes.SecurityQualityOfService = NULL;
if (lpSecurityAttributes)
{
if(lpSecurityAttributes->bInheritHandle)
ObjectAttributes.Attributes |= OBJ_INHERIT;
ObjectAttributes.SecurityDescriptor = lpSecurityAttributes->lpSecurityDescriptor;
}
Status = NtCreateFile (&FileHandle, Status = NtCreateFile (&FileHandle,
dwDesiredAccess, dwDesiredAccess,