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
b5245a15
Commit
b5245a15
authored
Jan 15, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Pass full object attributes in the create_timer request.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d05587af
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
29 deletions
+25
-29
sync.c
dlls/ntdll/sync.c
+8
-7
server_protocol.h
include/wine/server_protocol.h
+3
-5
protocol.def
server/protocol.def
+1
-3
request.h
server/request.h
+2
-4
timer.c
server/timer.c
+10
-7
trace.c
server/trace.c
+1
-3
No files found.
dlls/ntdll/sync.c
View file @
b5245a15
...
...
@@ -745,25 +745,26 @@ NTSTATUS WINAPI NtCreateTimer(OUT HANDLE *handle,
IN
const
OBJECT_ATTRIBUTES
*
attr
OPTIONAL
,
IN
TIMER_TYPE
timer_type
)
{
DWORD
len
=
(
attr
&&
attr
->
ObjectName
)
?
attr
->
ObjectName
->
Length
:
0
;
NTSTATUS
status
;
if
(
len
>=
MAX_PATH
*
sizeof
(
WCHAR
))
return
STATUS_NAME_TOO_LONG
;
NTSTATUS
status
;
data_size_t
len
;
struct
object_attributes
*
objattr
;
if
(
timer_type
!=
NotificationTimer
&&
timer_type
!=
SynchronizationTimer
)
return
STATUS_INVALID_PARAMETER
;
if
((
status
=
alloc_object_attributes
(
attr
,
&
objattr
,
&
len
)))
return
status
;
SERVER_START_REQ
(
create_timer
)
{
req
->
access
=
access
;
req
->
attributes
=
(
attr
)
?
attr
->
Attributes
:
0
;
req
->
rootdir
=
wine_server_obj_handle
(
attr
?
attr
->
RootDirectory
:
0
);
req
->
manual
=
(
timer_type
==
NotificationTimer
);
if
(
len
)
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffe
r
,
len
);
wine_server_add_data
(
req
,
objatt
r
,
len
);
status
=
wine_server_call
(
req
);
*
handle
=
wine_server_ptr_handle
(
reply
->
handle
);
}
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
return
status
;
}
...
...
include/wine/server_protocol.h
View file @
b5245a15
...
...
@@ -2601,11 +2601,9 @@ struct create_timer_request
{
struct
request_header
__header
;
unsigned
int
access
;
unsigned
int
attributes
;
obj_handle_t
rootdir
;
int
manual
;
/* VARARG(
name,unicode_str
); */
char
__pad_2
8
[
4
];
/* VARARG(
objattr,object_attributes
); */
char
__pad_2
0
[
4
];
};
struct
create_timer_reply
{
...
...
@@ -6171,6 +6169,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 49
4
#define SERVER_PROTOCOL_VERSION 49
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
b5245a15
...
...
@@ -1950,10 +1950,8 @@ enum char_info_mode
/* Create a waitable timer */
@REQ(create_timer)
unsigned int access; /* wanted access rights */
unsigned int attributes; /* object attributes */
obj_handle_t rootdir; /* root directory */
int manual; /* manual reset */
VARARG(
name,unicode_str); /* object name
*/
VARARG(
objattr,object_attributes); /* object attributes
*/
@REPLY
obj_handle_t handle; /* handle to the timer */
@END
...
...
server/request.h
View file @
b5245a15
...
...
@@ -1352,10 +1352,8 @@ C_ASSERT( FIELD_OFFSET(struct set_registry_notification_request, subtree) == 20
C_ASSERT
(
FIELD_OFFSET
(
struct
set_registry_notification_request
,
filter
)
==
24
);
C_ASSERT
(
sizeof
(
struct
set_registry_notification_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_timer_request
,
access
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_timer_request
,
attributes
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_timer_request
,
rootdir
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_timer_request
,
manual
)
==
24
);
C_ASSERT
(
sizeof
(
struct
create_timer_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_timer_request
,
manual
)
==
16
);
C_ASSERT
(
sizeof
(
struct
create_timer_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_timer_reply
,
handle
)
==
8
);
C_ASSERT
(
sizeof
(
struct
create_timer_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
open_timer_request
,
access
)
==
12
);
...
...
server/timer.c
View file @
b5245a15
...
...
@@ -80,7 +80,7 @@ static const struct object_ops timer_ops =
/* create a timer object */
static
struct
timer
*
create_timer
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
int
manual
)
unsigned
int
attr
,
int
manual
,
const
struct
security_descriptor
*
sd
)
{
struct
timer
*
timer
;
...
...
@@ -95,6 +95,9 @@ static struct timer *create_timer( struct directory *root, const struct unicode_
timer
->
period
=
0
;
timer
->
timeout
=
NULL
;
timer
->
thread
=
NULL
;
if
(
sd
)
default_set_sd
(
&
timer
->
obj
,
sd
,
OWNER_SECURITY_INFORMATION
|
GROUP_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
|
SACL_SECURITY_INFORMATION
);
}
}
return
timer
;
...
...
@@ -232,15 +235,15 @@ DECL_HANDLER(create_timer)
struct
timer
*
timer
;
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
const
struct
security_descriptor
*
sd
;
const
struct
object_attributes
*
objattr
=
get_req_object_attributes
(
&
sd
,
&
name
);
reply
->
handle
=
0
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
if
(
!
objattr
)
return
;
if
(
objattr
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
objattr
->
rootdir
,
0
)))
return
;
if
((
timer
=
create_timer
(
root
,
&
name
,
req
->
attributes
,
req
->
manual
)))
if
((
timer
=
create_timer
(
root
,
&
name
,
objattr
->
attributes
,
req
->
manual
,
sd
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
timer
,
req
->
access
,
req
->
attributes
);
reply
->
handle
=
alloc_handle
(
current
->
process
,
timer
,
req
->
access
,
objattr
->
attributes
);
release_object
(
timer
);
}
...
...
server/trace.c
View file @
b5245a15
...
...
@@ -2441,10 +2441,8 @@ static void dump_set_registry_notification_request( const struct set_registry_no
static
void
dump_create_timer_request
(
const
struct
create_timer_request
*
req
)
{
fprintf
(
stderr
,
" access=%08x"
,
req
->
access
);
fprintf
(
stderr
,
", attributes=%08x"
,
req
->
attributes
);
fprintf
(
stderr
,
", rootdir=%04x"
,
req
->
rootdir
);
fprintf
(
stderr
,
", manual=%d"
,
req
->
manual
);
dump_varargs_
unicode_str
(
", name
="
,
cur_size
);
dump_varargs_
object_attributes
(
", objattr
="
,
cur_size
);
}
static
void
dump_create_timer_reply
(
const
struct
create_timer_reply
*
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