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
35b56daf
Commit
35b56daf
authored
Mar 17, 2023
by
Sven Baars
Committed by
Alexandre Julliard
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Call open_key() from open_subkey().
parent
8b327eee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
24 deletions
+6
-24
registry.c
dlls/kernelbase/registry.c
+6
-24
No files found.
dlls/kernelbase/registry.c
View file @
35b56daf
...
...
@@ -140,20 +140,15 @@ static HKEY get_perflib_key( HANDLE key )
return
key
;
}
static
NTSTATUS
open_key
(
HKEY
*
retkey
,
HKEY
root
,
UNICODE_STRING
name
,
DWORD
options
,
ACCESS_MASK
access
);
static
NTSTATUS
open_subkey
(
HKEY
*
subkey
,
HKEY
root
,
UNICODE_STRING
*
name
,
DWORD
options
,
ACCESS_MASK
access
)
{
ACCESS_MASK
access_64
=
access
&
~
KEY_WOW64_32KEY
;
DWORD
i
=
0
,
len
=
name
->
Length
/
sizeof
(
WCHAR
);
WCHAR
*
buffer
=
name
->
Buffer
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
str
;
NTSTATUS
status
=
0
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
root
;
attr
.
ObjectName
=
&
str
;
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
NTSTATUS
status
;
if
(
len
>
0
&&
buffer
[
0
]
==
'\\'
)
return
STATUS_OBJECT_PATH_INVALID
;
while
(
i
<
len
&&
buffer
[
i
]
!=
'\\'
)
i
++
;
...
...
@@ -161,23 +156,10 @@ static NTSTATUS open_subkey( HKEY *subkey, HKEY root, UNICODE_STRING *name, DWOR
str
.
Buffer
=
name
->
Buffer
;
str
.
Length
=
i
*
sizeof
(
WCHAR
);
if
(
i
==
len
)
{
if
(
options
&
REG_OPTION_OPEN_LINK
)
attr
.
Attributes
|=
OBJ_OPENLINK
;
}
else
{
if
(
!
(
options
&
REG_OPTION_OPEN_LINK
))
attr
.
Attributes
&=
~
OBJ_OPENLINK
;
if
(
i
<
len
)
options
&=
~
REG_OPTION_OPEN_LINK
;
}
status
=
NtOpenKeyEx
(
(
HANDLE
*
)
subkey
,
access
,
&
attr
,
options
);
if
(
status
==
STATUS_PREDEFINED_HANDLE
)
{
*
subkey
=
get_perflib_key
(
*
subkey
);
status
=
STATUS_SUCCESS
;
}
status
=
open_key
(
subkey
,
root
,
str
,
options
,
access_64
);
if
(
!
status
)
{
while
(
i
<
len
&&
buffer
[
i
]
==
'\\'
)
i
++
;
...
...
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