Mikołaj Zalewski : advapi32: Remove access checks from advapi32 (makes KEY_WOW64_* work).
Module: wine Branch: stable Commit: 12db06129c2ac3d76bac8d219a71dbc7361c634c URL: http://source.winehq.org/git/wine.git/?a=commit;h=12db06129c2ac3d76bac8d219a... Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Thu Jul 24 12:19:17 2008 +0200 advapi32: Remove access checks from advapi32 (makes KEY_WOW64_* work). (cherry picked from commit daafda22f840edc9a584abc7925f9ee17ef18228) --- dlls/advapi32/registry.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index 9ce3da0..3a8ff4e 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -44,9 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg); -/* allowed bits for access mask */ -#define KEY_ACCESS_MASK (KEY_ALL_ACCESS | MAXIMUM_ALLOWED) - #define HKEY_SPECIAL_ROOT_FIRST HKEY_CLASSES_ROOT #define HKEY_SPECIAL_ROOT_LAST HKEY_DYN_DATA #define NB_SPECIAL_ROOT_KEYS ((UINT)HKEY_SPECIAL_ROOT_LAST - (UINT)HKEY_SPECIAL_ROOT_FIRST + 1) @@ -188,7 +185,6 @@ LSTATUS WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR UNICODE_STRING nameW, classW; if (reserved) return ERROR_INVALID_PARAMETER; - if (!(access & KEY_ACCESS_MASK) || (access & ~KEY_ACCESS_MASK)) return ERROR_ACCESS_DENIED; if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; attr.Length = sizeof(attr); @@ -243,7 +239,6 @@ LSTATUS WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR cl access = KEY_ALL_ACCESS; /* Win95 ignores the access mask */ if (name && *name == '\\') name++; /* win9x,ME ignores one (and only one) beginning backslash */ } - else if (!(access & KEY_ACCESS_MASK) || (access & ~KEY_ACCESS_MASK)) return ERROR_ACCESS_DENIED; if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; attr.Length = sizeof(attr);
participants (1)
-
Alexandre Julliard