From 8aa6e0e7f69165623a766c0f5d203283503bceb5 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Tue, 7 May 2002 22:21:02 +0000 Subject: [PATCH] Added handling for lpSecurityAttributes (for inheritable handles) in CreateFileW. svn path=/trunk/; revision=2919 --- reactos/lib/kernel32/file/create.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/lib/kernel32/file/create.c b/reactos/lib/kernel32/file/create.c index 0835d3bc4a1..7b55ee0056b 100644 --- a/reactos/lib/kernel32/file/create.c +++ b/reactos/lib/kernel32/file/create.c @@ -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,