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
b99d1525
Commit
b99d1525
authored
Jan 19, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Pass full object attributes in the load_registry request.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d01deff9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
18 deletions
+24
-18
reg.c
dlls/ntdll/reg.c
+6
-3
server_protocol.h
include/wine/server_protocol.h
+2
-4
protocol.def
server/protocol.def
+1
-2
registry.c
server/registry.c
+11
-3
request.h
server/request.h
+2
-3
trace.c
server/trace.c
+2
-3
No files found.
dlls/ntdll/reg.c
View file @
b99d1525
...
...
@@ -660,6 +660,8 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil
NTSTATUS
ret
;
HANDLE
hive
;
IO_STATUS_BLOCK
io
;
data_size_t
len
;
struct
object_attributes
*
objattr
;
TRACE
(
"(%p,%p)
\n
"
,
attr
,
file
);
...
...
@@ -667,17 +669,18 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil
FILE_OPEN
,
0
,
NULL
,
0
);
if
(
ret
)
return
ret
;
if
((
ret
=
alloc_object_attributes
(
attr
,
&
objattr
,
&
len
)))
return
ret
;
SERVER_START_REQ
(
load_registry
)
{
req
->
hkey
=
wine_server_obj_handle
(
attr
->
RootDirectory
);
req
->
file
=
wine_server_obj_handle
(
hive
);
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
,
attr
->
ObjectName
->
Length
);
wine_server_add_data
(
req
,
objattr
,
len
);
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
NtClose
(
hive
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
return
ret
;
}
...
...
include/wine/server_protocol.h
View file @
b99d1525
...
...
@@ -2541,10 +2541,8 @@ struct delete_key_value_reply
struct
load_registry_request
{
struct
request_header
__header
;
obj_handle_t
hkey
;
obj_handle_t
file
;
/* VARARG(name,unicode_str); */
char
__pad_20
[
4
];
/* VARARG(objattr,object_attributes); */
};
struct
load_registry_reply
{
...
...
@@ -6157,6 +6155,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 49
8
#define SERVER_PROTOCOL_VERSION 49
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
b99d1525
...
...
@@ -1916,9 +1916,8 @@ enum char_info_mode
/* Load a registry branch from a file */
@REQ(load_registry)
obj_handle_t hkey; /* root key to load to */
obj_handle_t file; /* file to load from */
VARARG(
name,unicode_str); /* subkey name
*/
VARARG(
objattr,object_attributes); /* object attributes
*/
@END
...
...
server/registry.c
View file @
b99d1525
...
...
@@ -2184,6 +2184,8 @@ DECL_HANDLER(load_registry)
{
struct
key
*
key
,
*
parent
;
struct
unicode_str
name
;
const
struct
security_descriptor
*
sd
;
const
struct
object_attributes
*
objattr
=
get_req_object_attributes
(
&
sd
,
&
name
);
if
(
!
thread_single_check_privilege
(
current
,
&
SeRestorePrivilege
))
{
...
...
@@ -2191,11 +2193,17 @@ DECL_HANDLER(load_registry)
return
;
}
if
((
parent
=
get_parent_hkey_obj
(
req
->
hkey
)))
if
(
!
objattr
->
rootdir
&&
name
.
len
>=
sizeof
(
root_name
)
&&
!
memicmpW
(
name
.
str
,
root_name
,
sizeof
(
root_name
)
/
sizeof
(
WCHAR
)
))
{
name
.
str
+=
sizeof
(
root_name
)
/
sizeof
(
WCHAR
);
name
.
len
-=
sizeof
(
root_name
);
}
if
((
parent
=
get_parent_hkey_obj
(
objattr
->
rootdir
)))
{
int
dummy
;
get_req_path
(
&
name
,
!
req
->
hkey
);
if
((
key
=
create_key
(
parent
,
&
name
,
NULL
,
0
,
KEY_WOW64_64KEY
,
0
,
NULL
,
&
dummy
)))
if
((
key
=
create_key
(
parent
,
&
name
,
NULL
,
0
,
KEY_WOW64_64KEY
,
0
,
sd
,
&
dummy
)))
{
load_registry
(
key
,
req
->
file
);
release_object
(
key
);
...
...
server/request.h
View file @
b99d1525
...
...
@@ -1336,9 +1336,8 @@ C_ASSERT( FIELD_OFFSET(struct enum_key_value_reply, namelen) == 16 );
C_ASSERT
(
sizeof
(
struct
enum_key_value_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
delete_key_value_request
,
hkey
)
==
12
);
C_ASSERT
(
sizeof
(
struct
delete_key_value_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_registry_request
,
hkey
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_registry_request
,
file
)
==
16
);
C_ASSERT
(
sizeof
(
struct
load_registry_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_registry_request
,
file
)
==
12
);
C_ASSERT
(
sizeof
(
struct
load_registry_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
unload_registry_request
,
hkey
)
==
12
);
C_ASSERT
(
sizeof
(
struct
unload_registry_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
save_registry_request
,
hkey
)
==
12
);
...
...
server/trace.c
View file @
b99d1525
...
...
@@ -2411,9 +2411,8 @@ static void dump_delete_key_value_request( const struct delete_key_value_request
static
void
dump_load_registry_request
(
const
struct
load_registry_request
*
req
)
{
fprintf
(
stderr
,
" hkey=%04x"
,
req
->
hkey
);
fprintf
(
stderr
,
", file=%04x"
,
req
->
file
);
dump_varargs_unicode_str
(
", name="
,
cur_size
);
fprintf
(
stderr
,
" file=%04x"
,
req
->
file
);
dump_varargs_object_attributes
(
", objattr="
,
cur_size
);
}
static
void
dump_unload_registry_request
(
const
struct
unload_registry_request
*
req
)
...
...
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