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
dd77d1a9
Commit
dd77d1a9
authored
Jul 10, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Only accept 0 as registry handle in functions that take a parent key.
parent
ccf2f568
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
registry.c
server/registry.c
+11
-5
No files found.
server/registry.c
View file @
dd77d1a9
...
...
@@ -1003,12 +1003,18 @@ static void delete_value( struct key *key, const struct unicode_str *name )
}
/* get the registry key corresponding to an hkey handle */
static
struct
key
*
get_hkey_obj
(
obj_handle_t
hkey
,
unsigned
int
access
)
static
inline
struct
key
*
get_hkey_obj
(
obj_handle_t
hkey
,
unsigned
int
access
)
{
if
(
!
hkey
)
return
(
struct
key
*
)
grab_object
(
root_key
);
return
(
struct
key
*
)
get_handle_obj
(
current
->
process
,
hkey
,
access
,
&
key_ops
);
}
/* get the registry key corresponding to a parent key handle */
static
inline
struct
key
*
get_parent_hkey_obj
(
obj_handle_t
hkey
)
{
if
(
!
hkey
)
return
(
struct
key
*
)
grab_object
(
root_key
);
return
(
struct
key
*
)
get_handle_obj
(
current
->
process
,
hkey
,
0
,
&
key_ops
);
}
/* read a line from the input file */
static
int
read_next_line
(
struct
file_load_info
*
info
)
{
...
...
@@ -1727,7 +1733,7 @@ DECL_HANDLER(create_key)
name
.
len
=
(
class
.
str
-
name
.
str
)
*
sizeof
(
WCHAR
);
/* NOTE: no access rights are required from the parent handle to create a key */
if
((
parent
=
get_
hkey_obj
(
req
->
parent
,
0
)))
if
((
parent
=
get_
parent_hkey_obj
(
req
->
parent
)))
{
int
flags
=
(
req
->
options
&
REG_OPTION_VOLATILE
)
?
KEY_VOLATILE
:
KEY_DIRTY
;
...
...
@@ -1750,7 +1756,7 @@ DECL_HANDLER(open_key)
if
(
access
&
MAXIMUM_ALLOWED
)
access
=
KEY_ALL_ACCESS
;
/* FIXME: needs general solution */
reply
->
hkey
=
0
;
/* NOTE: no access rights are required to open the parent key, only the child key */
if
((
parent
=
get_
hkey_obj
(
req
->
parent
,
0
)))
if
((
parent
=
get_
parent_hkey_obj
(
req
->
parent
)))
{
get_req_path
(
&
name
,
!
req
->
parent
);
if
((
key
=
open_key
(
parent
,
&
name
)))
...
...
@@ -1883,7 +1889,7 @@ DECL_HANDLER(load_registry)
return
;
}
if
((
parent
=
get_
hkey_obj
(
req
->
hkey
,
0
)))
if
((
parent
=
get_
parent_hkey_obj
(
req
->
hkey
)))
{
int
dummy
;
get_req_path
(
&
name
,
!
req
->
hkey
);
...
...
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