https://git.reactos.org/?p=reactos.git;a=commitdiff;h=027df341f39f011d11faf…
commit 027df341f39f011d11faf373b80ccada3bf0317b
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun Nov 11 15:34:59 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Nov 11 17:21:16 2018 +0100
[GFLAGS] Use the registry access flags passed in
---
modules/rosapps/applications/cmdutils/gflags/gflags.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/rosapps/applications/cmdutils/gflags/gflags.c
b/modules/rosapps/applications/cmdutils/gflags/gflags.c
index f97f1f5f09..a43382cd1c 100644
--- a/modules/rosapps/applications/cmdutils/gflags/gflags.c
+++ b/modules/rosapps/applications/cmdutils/gflags/gflags.c
@@ -18,7 +18,7 @@ BOOL OpenImageFileExecOptions(IN REGSAM SamDesired, IN OPTIONAL PCWSTR
ImageName
LONG Ret;
HKEY HandleKey, HandleSubKey;
- Ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, ImageExecOptionsString, 0, KEY_WRITE |
KEY_READ, &HandleKey);
+ Ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, ImageExecOptionsString, 0, SamDesired,
&HandleKey);
if (Ret != ERROR_SUCCESS)
{
wprintf(L"OpenIFEO: RegOpenKeyEx failed (%d)\n", Ret);
@@ -31,7 +31,7 @@ BOOL OpenImageFileExecOptions(IN REGSAM SamDesired, IN OPTIONAL PCWSTR
ImageName
return TRUE;
}
- Ret = RegCreateKeyExW(HandleKey, ImageName, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE | KEY_READ, NULL, &HandleSubKey, NULL);
+ Ret = RegCreateKeyExW(HandleKey, ImageName, 0, NULL, REG_OPTION_NON_VOLATILE,
SamDesired, NULL, &HandleSubKey, NULL);
CloseHandle(HandleKey);
if (Ret != ERROR_SUCCESS)