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
fe8b10f8
Commit
fe8b10f8
authored
Sep 19, 2022
by
Sven Baars
Committed by
Alexandre Julliard
Nov 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't return the actual 32-bit Software\Classes key.
parent
0edf023b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
+24
-12
reg.c
dlls/ntdll/tests/reg.c
+8
-8
registry.c
server/registry.c
+16
-4
No files found.
dlls/ntdll/tests/reg.c
View file @
fe8b10f8
...
...
@@ -2125,7 +2125,7 @@ static void test_redirection(void)
status
=
pNtQueryKey
(
root32
,
KeyFullInformation
,
full_info
,
sizeof
(
buffer
),
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryKey failed: 0x%08lx
\n
"
,
status
);
todo_wine_if
(
ptr_size
==
32
)
ok
(
full_info
->
SubKeys
==
subkeys64
,
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
ok
(
full_info
->
SubKeys
==
subkeys64
,
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
subkeys
=
full_info
->
SubKeys
;
found
=
FALSE
;
...
...
@@ -2137,7 +2137,7 @@ static void test_redirection(void)
if
(
basic_info
->
NameLength
==
sizeof
(
wineW
)
&&
!
memcmp
(
basic_info
->
Name
,
wineW
,
sizeof
(
wineW
)
))
found
=
TRUE
;
}
todo_wine_if
(
ptr_size
==
32
)
ok
(
ptr_size
==
32
?
found
:
!
found
,
"key not found
\n
"
);
ok
(
ptr_size
==
32
?
found
:
!
found
,
"key not found
\n
"
);
pNtClose
(
root32
);
status
=
pNtOpenKey
(
&
root64
,
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
,
&
attr
);
...
...
@@ -2165,7 +2165,7 @@ static void test_redirection(void)
status
=
pNtQueryKey
(
root64
,
KeyFullInformation
,
full_info
,
sizeof
(
buffer
),
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryKey failed: 0x%08lx
\n
"
,
status
);
todo_wine_if
(
ptr_size
==
32
)
ok
(
full_info
->
SubKeys
==
subkeys64
,
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
ok
(
full_info
->
SubKeys
==
subkeys64
,
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
subkeys
=
full_info
->
SubKeys
;
found
=
FALSE
;
...
...
@@ -2177,7 +2177,7 @@ static void test_redirection(void)
if
(
basic_info
->
NameLength
==
sizeof
(
wineW
)
&&
!
memcmp
(
basic_info
->
Name
,
wineW
,
sizeof
(
wineW
)
))
found
=
TRUE
;
}
todo_wine_if
(
ptr_size
==
32
)
ok
(
ptr_size
==
32
?
found
:
!
found
,
"key not found
\n
"
);
ok
(
ptr_size
==
32
?
found
:
!
found
,
"key not found
\n
"
);
pNtClose
(
root64
);
pRtlInitUnicodeString
(
&
str
,
L"
\\
Registry
\\
Machine
\\
Software
\\
Classes
\\
Wow6432Node"
);
...
...
@@ -2247,7 +2247,7 @@ static void test_redirection(void)
status
=
pNtQueryKey
(
root32
,
KeyFullInformation
,
full_info
,
sizeof
(
buffer
),
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryKey failed: 0x%08lx
\n
"
,
status
);
todo_wine_if
(
ptr_size
==
32
)
ok
(
full_info
->
SubKeys
==
(
ptr_size
==
32
?
subkeys64
:
subkeys32
),
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
ok
(
full_info
->
SubKeys
==
(
ptr_size
==
32
?
subkeys64
:
subkeys32
),
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
subkeys
=
full_info
->
SubKeys
;
found
=
FALSE
;
...
...
@@ -2259,7 +2259,7 @@ static void test_redirection(void)
if
(
basic_info
->
NameLength
==
sizeof
(
wineW
)
&&
!
memcmp
(
basic_info
->
Name
,
wineW
,
sizeof
(
wineW
)
))
found
=
TRUE
;
}
todo_wine_if
(
ptr_size
==
32
)
ok
(
found
,
"key not found
\n
"
);
ok
(
found
,
"key not found
\n
"
);
pNtClose
(
root32
);
status
=
pNtOpenKey
(
&
root64
,
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
,
&
attr
);
...
...
@@ -2287,7 +2287,7 @@ static void test_redirection(void)
status
=
pNtQueryKey
(
root64
,
KeyFullInformation
,
full_info
,
sizeof
(
buffer
),
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NQtueryKey failed: 0x%08lx
\n
"
,
status
);
todo_wine_if
(
ptr_size
==
32
)
ok
(
full_info
->
SubKeys
==
(
ptr_size
==
32
?
subkeys64
:
subkeys32
),
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
ok
(
full_info
->
SubKeys
==
(
ptr_size
==
32
?
subkeys64
:
subkeys32
),
"wrong number of subkeys: %lu
\n
"
,
full_info
->
SubKeys
);
subkeys
=
full_info
->
SubKeys
;
found
=
FALSE
;
...
...
@@ -2299,7 +2299,7 @@ static void test_redirection(void)
if
(
basic_info
->
NameLength
==
sizeof
(
wineW
)
&&
!
memcmp
(
basic_info
->
Name
,
wineW
,
sizeof
(
wineW
)
))
found
=
TRUE
;
}
todo_wine_if
(
ptr_size
==
32
)
ok
(
found
,
"key not found
\n
"
);
ok
(
found
,
"key not found
\n
"
);
pNtClose
(
root64
);
pNtDeleteKey
(
key32
);
...
...
server/registry.c
View file @
fe8b10f8
...
...
@@ -516,6 +516,15 @@ static struct object *key_lookup_name( struct object *obj, struct unicode_str *n
set_error
(
STATUS_OBJECT_NAME_NOT_FOUND
);
}
}
key
=
(
struct
key
*
)
obj
;
if
(
key
&&
(
key
->
flags
&
KEY_WOWSHARE
)
&&
(
attr
&
OBJ_KEY_WOW64
)
&&
!
name
->
str
)
{
key
=
get_parent
(
key
);
release_object
(
obj
);
return
grab_object
(
key
);
}
return
obj
;
}
...
...
@@ -768,6 +777,7 @@ static struct key *grab_wow6432node( struct key *key )
struct
key
*
ret
=
key
->
wow6432node
;
if
(
!
ret
)
return
key
;
if
(
ret
->
flags
&
KEY_WOWSHARE
)
return
key
;
grab_object
(
ret
);
release_object
(
key
);
return
ret
;
...
...
@@ -810,9 +820,10 @@ static struct key *open_key( struct key *parent, const struct unicode_str *name,
return
NULL
;
}
if
(
parent
&&
(
access
&
KEY_WOW64_32
KEY
)
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
))
if
(
parent
&&
!
(
access
&
KEY_WOW64_64
KEY
)
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
))
{
if
((
key
=
get_wow6432node
(
parent
)))
key
=
get_wow6432node
(
parent
);
if
(
key
&&
((
access
&
KEY_WOW64_32KEY
)
||
(
key
->
flags
&
KEY_WOWSHARE
)))
parent
=
key
;
}
...
...
@@ -835,9 +846,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_32
KEY
)
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
))
if
(
parent
&&
!
(
access
&
KEY_WOW64_64
KEY
)
&&
!
is_wow6432node
(
name
->
str
,
name
->
len
))
{
if
((
key
=
get_wow6432node
(
parent
)))
key
=
get_wow6432node
(
parent
);
if
(
key
&&
((
access
&
KEY_WOW64_32KEY
)
||
(
key
->
flags
&
KEY_WOWSHARE
)))
parent
=
key
;
}
...
...
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