Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b8d7434e
Commit
b8d7434e
authored
Sep 20, 2022
by
Sven Baars
Committed by
Alexandre Julliard
Nov 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Recursively obtain the Wow6432Node parent.
parent
3b77a8e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
9 deletions
+34
-9
registry.c
dlls/advapi32/tests/registry.c
+1
-1
reg.c
dlls/ntdll/tests/reg.c
+2
-3
registry.c
server/registry.c
+31
-5
No files found.
dlls/advapi32/tests/registry.c
View file @
b8d7434e
...
...
@@ -2721,7 +2721,7 @@ static void test_redirection(void)
check_key_value
(
key
,
"Winetest"
,
0
,
64
);
check_key_value
(
key
,
"Winetest"
,
KEY_WOW64_64KEY
,
64
);
dw
=
get_key_value
(
key
,
"Winetest"
,
KEY_WOW64_32KEY
);
todo_wine
ok
(
dw
==
32
,
"wrong value %lu
\n
"
,
dw
);
todo_wine
_if
(
ptr_size
==
64
)
ok
(
dw
==
32
,
"wrong value %lu
\n
"
,
dw
);
RegCloseKey
(
key
);
err
=
RegCreateKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine"
,
0
,
NULL
,
0
,
...
...
dlls/ntdll/tests/reg.c
View file @
b8d7434e
...
...
@@ -1630,8 +1630,7 @@ static void test_redirection(void)
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
check_key_value
(
key
,
"Winetest"
,
0
,
64
);
check_key_value
(
key
,
"Winetest"
,
KEY_WOW64_64KEY
,
64
);
dw
=
get_key_value
(
key
,
"Winetest"
,
KEY_WOW64_32KEY
);
todo_wine_if
(
ptr_size
==
32
)
ok
(
dw
==
ptr_size
,
"wrong value %lu
\n
"
,
dw
);
check_key_value
(
key
,
"Winetest"
,
KEY_WOW64_32KEY
,
ptr_size
);
pNtClose
(
key
);
status
=
pNtCreateKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
...
...
@@ -1993,7 +1992,7 @@ static void test_redirection(void)
if
(
!
status
)
pNtClose
(
key
);
status
=
pNtOpenKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
todo_wine_if
(
ptr_size
==
32
)
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
pNtClose
(
key
);
attr
.
RootDirectory
=
root32
;
...
...
server/registry.c
View file @
b8d7434e
...
...
@@ -773,6 +773,31 @@ static struct key *grab_wow6432node( struct key *key )
return
ret
;
}
/* recursively obtain the wow6432node parent key if any */
static
struct
key
*
get_wow6432node
(
struct
key
*
key
)
{
struct
key
*
parent
,
*
ret
;
struct
unicode_str
name
;
int
index
;
if
(
!
key
)
return
NULL
;
if
(
key
->
wow6432node
)
return
key
->
wow6432node
;
parent
=
get_parent
(
key
);
if
(
parent
&&
key
==
parent
->
wow6432node
)
return
key
;
if
(
!
(
ret
=
get_wow6432node
(
parent
)))
return
key
;
name
.
str
=
key
->
obj
.
name
->
name
;
name
.
len
=
key
->
obj
.
name
->
len
;
return
find_subkey
(
ret
,
&
name
,
&
index
);
}
/* open a subkey */
static
struct
key
*
open_key
(
struct
key
*
parent
,
const
struct
unicode_str
*
name
,
unsigned
int
access
,
unsigned
int
attributes
)
...
...
@@ -785,10 +810,10 @@ static struct key *open_key( struct key *parent, const struct unicode_str *name,
return
NULL
;
}
if
(
parent
&&
(
access
&
KEY_WOW64_32KEY
))
if
(
parent
&&
(
access
&
KEY_WOW64_32KEY
)
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
)
)
{
if
(
parent
->
wow6432node
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
))
parent
=
parent
->
wow6432node
;
if
(
(
key
=
get_wow6432node
(
parent
)
))
parent
=
key
;
}
if
(
!
(
access
&
KEY_WOW64_64KEY
))
attributes
|=
OBJ_KEY_WOW64
;
...
...
@@ -810,9 +835,10 @@ static struct key *create_key( struct key *parent, const struct unicode_str *nam
if
(
options
&
REG_OPTION_CREATE_LINK
)
attributes
=
(
attributes
&
~
OBJ_OPENIF
)
|
OBJ_OPENLINK
;
if
(
parent
&&
(
access
&
KEY_WOW64_32KEY
))
if
(
parent
&&
(
access
&
KEY_WOW64_32KEY
)
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
)
)
{
if
(
parent
->
wow6432node
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
))
parent
=
parent
->
wow6432node
;
if
((
key
=
get_wow6432node
(
parent
)))
parent
=
key
;
}
if
(
!
(
access
&
KEY_WOW64_64KEY
))
attributes
|=
OBJ_KEY_WOW64
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment