* security.cc (check_registry_access): Handle missing

security descriptor of HKEY_PERFORMANCE_DATA.
This commit is contained in:
Christian Franke 2011-05-10 17:19:37 +00:00
parent b6151db104
commit 3bcc74a9ae
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-05-10 Christian Franke <franke@computer.org>
* security.cc (check_registry_access): Handle missing
security descriptor of HKEY_PERFORMANCE_DATA.
2011-05-10 Corinna Vinschen <corinna@vinschen.de>
* lc_msg.h: Regenerate.

View File

@ -1085,8 +1085,13 @@ check_registry_access (HANDLE hdl, int flags, bool effective)
desired |= KEY_SET_VALUE;
if (flags & X_OK)
desired |= KEY_QUERY_VALUE;
if (!get_reg_sd (hdl, sd))
if ((HKEY) hdl == HKEY_PERFORMANCE_DATA)
/* RegGetKeySecurity() always fails with ERROR_INVALID_HANDLE. */
ret = 0;
else if (!get_reg_sd (hdl, sd))
ret = check_access (sd, reg_mapping, desired, flags, effective);
/* As long as we can't write the registry... */
if (flags & W_OK)
{