From eb1711bf5edfdba99595f41dd5d8345d5440aa27 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 23 Apr 2004 02:40:51 +0000 Subject: [PATCH] Use a passed SecurityDescriptor in CreateFileW. --- files/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/file.c b/files/file.c index 56aed44a424..18d27464ac6 100644 --- a/files/file.c +++ b/files/file.c @@ -55,6 +55,9 @@ #ifdef HAVE_UTIME_H # include #endif +#ifdef HAVE_IO_H +# include +#endif #define NONAMELESSUNION #define NONAMELESSSTRUCT @@ -458,7 +461,7 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing, attr.RootDirectory = 0; attr.Attributes = OBJ_CASE_INSENSITIVE; attr.ObjectName = &nameW; - attr.SecurityDescriptor = NULL; + attr.SecurityDescriptor = sa ? sa->lpSecurityDescriptor : NULL; attr.SecurityQualityOfService = NULL; if (sa && sa->bInheritHandle) attr.Attributes |= OBJ_INHERIT; -- 2.11.4.GIT