Author: hbelusca
Date: Wed May 31 02:08:16 2017
New Revision: 74716
URL:
http://svn.reactos.org/svn/reactos?rev=74716&view=rev
Log:
[USETUP]: Try to use correct flags for the NtCreateFile call that creates new file
directories.
DIRECTORY_ALL_ACCESS is not the correct flag, because it is used with the
NtCreateDirectoryObject API that creates virtual "directories" in the NT object
namespace; that's not our purpose here.
This commit needs review to verify which flags are actually the best.
Modified:
branches/setup_improvements/base/setup/usetup/filesup.c
Modified: branches/setup_improvements/base/setup/usetup/filesup.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
==============================================================================
--- branches/setup_improvements/base/setup/usetup/filesup.c [iso-8859-1] (original)
+++ branches/setup_improvements/base/setup/usetup/filesup.c [iso-8859-1] Wed May 31
02:08:16 2017
@@ -56,14 +56,14 @@
NULL);
Status = NtCreateFile(&DirectoryHandle,
- DIRECTORY_ALL_ACCESS,
+ FILE_LIST_DIRECTORY | FILE_TRAVERSE | FILE_ADD_FILE |
FILE_ADD_SUBDIRECTORY | SYNCHRONIZE,
&ObjectAttributes,
&IoStatusBlock,
NULL,
FILE_ATTRIBUTE_DIRECTORY,
FILE_SHARE_READ | FILE_SHARE_WRITE,
FILE_OPEN_IF,
- FILE_DIRECTORY_FILE,
+ FILE_OPEN_FOR_BACKUP_INTENT | FILE_DIRECTORY_FILE,
NULL,
0);
if (NT_SUCCESS(Status))