Author: tfaber
Date: Fri Nov 27 08:07:46 2015
New Revision: 70145
URL:
http://svn.reactos.org/svn/reactos?rev=70145&view=rev
Log:
[SETUPAPI]
- Do not open registry keys with no access rights
CORE-10587
Modified:
trunk/reactos/dll/win32/setupapi/devinst.c
trunk/reactos/dll/win32/setupapi/install.c
trunk/reactos/dll/win32/setupapi/interface.c
Modified: trunk/reactos/dll/win32/setupapi/devinst.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] Fri Nov 27 08:07:46 2015
@@ -4719,7 +4719,7 @@
rc = RegOpenKeyExW(HKLM,
REGSTR_PATH_HWPROFILES,
0,
- 0,
+ READ_CONTROL,
&hHWProfilesKey);
if (rc != ERROR_SUCCESS)
{
@@ -4909,7 +4909,7 @@
list->HKLM,
REGSTR_PATH_SYSTEMENUM,
0, /* Options */
- 0,
+ READ_CONTROL,
&hEnumKey);
if (rc != ERROR_SUCCESS)
{
@@ -5697,7 +5697,7 @@
HKEY enumKey, key = INVALID_HANDLE_VALUE;
LONG l;
- l = RegOpenKeyExW(RootKey, REGSTR_PATH_SYSTEMENUM, 0, 0, &enumKey);
+ l = RegOpenKeyExW(RootKey, REGSTR_PATH_SYSTEMENUM, 0, READ_CONTROL, &enumKey);
if (!l)
{
l = RegOpenKeyExW(enumKey, devInfo->instanceId, 0, samDesired, &key);
@@ -5752,7 +5752,7 @@
RootKey,
REGSTR_PATH_CLASS_NT,
0, /* Options */
- 0,
+ READ_CONTROL,
&hEnumKey);
if (rc != ERROR_SUCCESS)
{
Modified: trunk/reactos/dll/win32/setupapi/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/install…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/install.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/install.c [iso-8859-1] Fri Nov 27 08:07:46 2015
@@ -1997,7 +1997,7 @@
list ? list->HKLM : HKEY_LOCAL_MACHINE,
REGSTR_PATH_SERVICES,
0,
- 0,
+ READ_CONTROL,
&hServicesKey);
if (rc != ERROR_SUCCESS)
{
Modified: trunk/reactos/dll/win32/setupapi/interface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/interfa…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/interface.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/interface.c [iso-8859-1] Fri Nov 27 08:07:46 2015
@@ -155,7 +155,7 @@
list->HKLM,
REGSTR_PATH_SYSTEMENUM,
0, /* Options */
- 0,
+ READ_CONTROL,
&hEnumKey);
if (rc != ERROR_SUCCESS)
goto cleanup;