Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
076fb381
Commit
076fb381
authored
Mar 09, 2023
by
Sven Baars
Committed by
Alexandre Julliard
Mar 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Pass the root key to create_key().
parent
75aa00a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
registry.c
dlls/kernelbase/registry.c
+5
-5
No files found.
dlls/kernelbase/registry.c
View file @
076fb381
...
...
@@ -140,12 +140,12 @@ static HKEY get_perflib_key( HANDLE key )
}
/* wrapper for NtCreateKey that creates the key recursively if necessary */
static
NTSTATUS
create_key
(
HKEY
*
retkey
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
,
static
NTSTATUS
create_key
(
HKEY
*
retkey
,
HKEY
root
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
,
const
UNICODE_STRING
*
class
,
ULONG
options
,
PULONG
dispos
)
{
BOOL
force_wow32
=
is_win64
&&
(
access
&
KEY_WOW64_32KEY
);
NTSTATUS
status
=
STATUS_OBJECT_NAME_NOT_FOUND
;
HANDLE
subkey
,
root
=
attr
->
RootDirectory
;
HANDLE
subkey
;
if
(
!
force_wow32
)
status
=
NtCreateKey
(
&
subkey
,
access
,
attr
,
0
,
class
,
options
,
dispos
);
...
...
@@ -316,7 +316,7 @@ static HKEY create_special_root_hkey( HKEY hkey, DWORD access )
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
RtlInitUnicodeString
(
&
name
,
root_key_names
[
idx
]
);
if
(
create_key
(
&
hkey
,
access
,
&
attr
,
NULL
,
0
,
NULL
))
return
0
;
if
(
create_key
(
&
hkey
,
0
,
access
,
&
attr
,
NULL
,
0
,
NULL
))
return
0
;
TRACE
(
"%s -> %p
\n
"
,
debugstr_w
(
attr
.
ObjectName
->
Buffer
),
hkey
);
}
...
...
@@ -444,7 +444,7 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD
RtlInitUnicodeString
(
&
nameW
,
name
);
RtlInitUnicodeString
(
&
classW
,
class
);
return
RtlNtStatusToDosError
(
create_key
(
retkey
,
access
,
&
attr
,
&
classW
,
options
,
dispos
)
);
return
RtlNtStatusToDosError
(
create_key
(
retkey
,
hkey
,
access
,
&
attr
,
&
classW
,
options
,
dispos
)
);
}
...
...
@@ -503,7 +503,7 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD
{
if
(
!
(
status
=
RtlAnsiStringToUnicodeString
(
&
classW
,
&
classA
,
TRUE
)))
{
status
=
create_key
(
retkey
,
access
,
&
attr
,
&
classW
,
options
,
dispos
);
status
=
create_key
(
retkey
,
hkey
,
access
,
&
attr
,
&
classW
,
options
,
dispos
);
RtlFreeUnicodeString
(
&
classW
);
}
}
...
...
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