Alexandre Julliard : server: Create new keys in the parent of a shared key.
Alexandre Julliard
julliard at winehq.org
Wed Jul 13 16:54:55 CDT 2022
Module: wine
Branch: master
Commit: bd5edbe1eb1d1e57ded07e291fdc0fd0000a40dc
URL: https://gitlab.winehq.org/wine/wine/-/commit/bd5edbe1eb1d1e57ded07e291fdc0fd0000a40dc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jul 13 12:29:01 2022 +0200
server: Create new keys in the parent of a shared key.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53343
---
dlls/ntdll/tests/reg.c | 8 --------
server/registry.c | 7 +++++--
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 10e69b73e6d..f3c4eb15da0 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -1829,30 +1829,22 @@ static void test_redirection(void)
attr.RootDirectory = root64;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- todo_wine_if( ptr_size == 32)
ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
- if (!status)
- {
len = sizeof(buffer);
status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len );
ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
dw = *(DWORD *)info->Data;
ok( dw == 32, "wrong value %lu\n", dw );
pNtClose( key );
- }
attr.RootDirectory = root64;
status = pNtOpenKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr );
- todo_wine_if( ptr_size == 32)
ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
- if (!status)
- {
len = sizeof(buffer);
status = pNtQueryValueKey( key64, &value_str, KeyValuePartialInformation, info, len, &len );
ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
dw = *(DWORD *)info->Data;
ok( dw == 32, "wrong value %lu\n", dw );
- }
pNtDeleteKey( key32 );
pNtClose( key32 );
diff --git a/server/registry.c b/server/registry.c
index f9a9f75a974..96ba18a0a5a 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -536,9 +536,12 @@ static struct object *key_lookup_name( struct object *obj, struct unicode_str *n
if (!(found = find_subkey( key, &tmp, &index )))
{
- /* try in the 64-bit parent */
if ((key->flags & KEY_WOWSHARE) && (attr & OBJ_KEY_WOW64))
- found = find_subkey( get_parent( key ), &tmp, &index );
+ {
+ /* try in the 64-bit parent */
+ key = get_parent( key );
+ if (!(found = find_subkey( key, &tmp, &index ))) return grab_object( key );
+ }
}
if (!found)
More information about the wine-cvs
mailing list