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
6cbe072c
Commit
6cbe072c
authored
Feb 27, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Feb 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use KEY_WOW64_64KEY flag when 64 bit registry access is assumed.
parent
61983465
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
registry.c
dlls/advapi32/tests/registry.c
+22
-0
registry.c
dlls/kernelbase/registry.c
+2
-2
No files found.
dlls/advapi32/tests/registry.c
View file @
6cbe072c
...
...
@@ -2778,6 +2778,28 @@ static void test_redirection(void)
RegCloseKey
(
root32
);
RegCloseKey
(
root64
);
err
=
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
L"Software
\\
WOW6432Node
\\
test1
\\
test2"
,
0
,
NULL
,
0
,
KEY_WRITE
|
KEY_WOW64_32KEY
,
NULL
,
&
key
,
NULL
);
ok
(
!
err
,
"got %#lx.
\n
"
,
err
);
RegCloseKey
(
key
);
err
=
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
L"Software
\\
test1
\\
test2"
,
0
,
NULL
,
0
,
KEY_WRITE
|
KEY_WOW64_32KEY
,
NULL
,
&
key
,
NULL
);
ok
(
!
err
,
"got %#lx.
\n
"
,
err
);
RegCloseKey
(
key
);
err
=
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
L"Software
\\
test1
\\
test2"
,
0
,
KEY_WRITE
|
KEY_WOW64_32KEY
,
&
key
);
ok
(
!
err
,
"got %#lx.
\n
"
,
err
);
RegCloseKey
(
key
);
if
(
pRegDeleteTreeA
)
{
err
=
pRegDeleteTreeA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
WOW6432Node
\\
test1"
);
ok
(
!
err
,
"got %#lx.
\n
"
,
err
);
err
=
pRegDeleteTreeA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
test1"
);
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"got %#lx.
\n
"
,
err
);
}
/* Software\Classes is shared/reflected so behavior is different */
err
=
RegCreateKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Classes
\\
Wine"
,
...
...
dlls/kernelbase/registry.c
View file @
6cbe072c
...
...
@@ -165,7 +165,7 @@ static HANDLE open_wow6432node( HANDLE key )
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
NtOpenKeyEx
(
&
ret
,
MAXIMUM_ALLOWED
,
&
attr
,
0
))
return
key
;
if
(
NtOpenKeyEx
(
&
ret
,
MAXIMUM_ALLOWED
|
KEY_WOW64_64KEY
,
&
attr
,
0
))
return
key
;
return
ret
;
}
...
...
@@ -211,7 +211,7 @@ static NTSTATUS open_key( HKEY *retkey, HKEY root, UNICODE_STRING *name, DWORD o
static
NTSTATUS
open_subkey
(
HKEY
*
subkey
,
HKEY
root
,
UNICODE_STRING
*
name
,
DWORD
options
,
ACCESS_MASK
access
)
{
BOOL
is_wow64_key
=
(
is_win64
&&
(
access
&
KEY_WOW64_32KEY
))
||
(
is_wow64
&&
!
(
access
&
KEY_WOW64_64KEY
));
ACCESS_MASK
access_64
=
access
&
~
KEY_WOW64_32
KEY
;
ACCESS_MASK
access_64
=
(
access
&
~
KEY_WOW64_32KEY
)
|
KEY_WOW64_64
KEY
;
DWORD
i
=
0
,
len
=
name
->
Length
/
sizeof
(
WCHAR
);
WCHAR
*
buffer
=
name
->
Buffer
;
UNICODE_STRING
str
;
...
...
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