Commit bd5edbe1 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Create new keys in the parent of a shared key.

parent adb0ff57
......@@ -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 );
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment