mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 20:36:26 +00:00
[SETUPAPI]
- Do not open registry keys with no access rights CORE-10587 svn path=/trunk/; revision=70145
This commit is contained in:
parent
d1f13dc28b
commit
154274318f
3 changed files with 6 additions and 6 deletions
|
@ -4719,7 +4719,7 @@ OpenHardwareProfileKey(
|
||||||
rc = RegOpenKeyExW(HKLM,
|
rc = RegOpenKeyExW(HKLM,
|
||||||
REGSTR_PATH_HWPROFILES,
|
REGSTR_PATH_HWPROFILES,
|
||||||
0,
|
0,
|
||||||
0,
|
READ_CONTROL,
|
||||||
&hHWProfilesKey);
|
&hHWProfilesKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -4909,7 +4909,7 @@ SetupDiOpenDeviceInfoW(
|
||||||
list->HKLM,
|
list->HKLM,
|
||||||
REGSTR_PATH_SYSTEMENUM,
|
REGSTR_PATH_SYSTEMENUM,
|
||||||
0, /* Options */
|
0, /* Options */
|
||||||
0,
|
READ_CONTROL,
|
||||||
&hEnumKey);
|
&hEnumKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -5697,7 +5697,7 @@ static HKEY SETUPDI_OpenDevKey(HKEY RootKey, struct DeviceInfo *devInfo, REGSAM
|
||||||
HKEY enumKey, key = INVALID_HANDLE_VALUE;
|
HKEY enumKey, key = INVALID_HANDLE_VALUE;
|
||||||
LONG l;
|
LONG l;
|
||||||
|
|
||||||
l = RegOpenKeyExW(RootKey, REGSTR_PATH_SYSTEMENUM, 0, 0, &enumKey);
|
l = RegOpenKeyExW(RootKey, REGSTR_PATH_SYSTEMENUM, 0, READ_CONTROL, &enumKey);
|
||||||
if (!l)
|
if (!l)
|
||||||
{
|
{
|
||||||
l = RegOpenKeyExW(enumKey, devInfo->instanceId, 0, samDesired, &key);
|
l = RegOpenKeyExW(enumKey, devInfo->instanceId, 0, samDesired, &key);
|
||||||
|
@ -5752,7 +5752,7 @@ static HKEY SETUPDI_OpenDrvKey(HKEY RootKey, struct DeviceInfo *devInfo, REGSAM
|
||||||
RootKey,
|
RootKey,
|
||||||
REGSTR_PATH_CLASS_NT,
|
REGSTR_PATH_CLASS_NT,
|
||||||
0, /* Options */
|
0, /* Options */
|
||||||
0,
|
READ_CONTROL,
|
||||||
&hEnumKey);
|
&hEnumKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1997,7 +1997,7 @@ static BOOL InstallOneService(
|
||||||
list ? list->HKLM : HKEY_LOCAL_MACHINE,
|
list ? list->HKLM : HKEY_LOCAL_MACHINE,
|
||||||
REGSTR_PATH_SERVICES,
|
REGSTR_PATH_SERVICES,
|
||||||
0,
|
0,
|
||||||
0,
|
READ_CONTROL,
|
||||||
&hServicesKey);
|
&hServicesKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,7 +155,7 @@ SETUP_CreateInterfaceList(
|
||||||
list->HKLM,
|
list->HKLM,
|
||||||
REGSTR_PATH_SYSTEMENUM,
|
REGSTR_PATH_SYSTEMENUM,
|
||||||
0, /* Options */
|
0, /* Options */
|
||||||
0,
|
READ_CONTROL,
|
||||||
&hEnumKey);
|
&hEnumKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue