Added handling for lpSecurityAttributes (for inheritable handles) in CreateFileW.
authorHartmut Birr <osexpert@googlemail.com>
Tue, 7 May 2002 22:21:02 +0000 (22:21 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Tue, 7 May 2002 22:21:02 +0000 (22:21 +0000)
svn path=/trunk/; revision=2919

reactos/lib/kernel32/file/create.c

index 0835d3b..7b55ee0 100644 (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
@@ -131,6 +131,13 @@ HANDLE STDCALL CreateFileW (LPCWSTR                        lpFileName,
    ObjectAttributes.Attributes = OBJ_CASE_INSENSITIVE;
    ObjectAttributes.SecurityDescriptor = NULL;
    ObjectAttributes.SecurityQualityOfService = NULL;
+
+   if (lpSecurityAttributes)
+   {
+      if(lpSecurityAttributes->bInheritHandle)
+         ObjectAttributes.Attributes |= OBJ_INHERIT;
+      ObjectAttributes.SecurityDescriptor = lpSecurityAttributes->lpSecurityDescriptor;
+   }
    
    Status = NtCreateFile (&FileHandle,
                          dwDesiredAccess,