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
1eb69be3
Commit
1eb69be3
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_completion request.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
426c4a2f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
31 deletions
+28
-31
sync.c
dlls/ntdll/sync.c
+9
-8
server_protocol.h
include/wine/server_protocol.h
+3
-5
completion.c
server/completion.c
+12
-8
protocol.def
server/protocol.def
+1
-3
request.h
server/request.h
+2
-4
trace.c
server/trace.c
+1
-3
No files found.
dlls/ntdll/sync.c
View file @
1eb69be3
...
...
@@ -1153,29 +1153,30 @@ NTSTATUS WINAPI NtReleaseKeyedEvent( HANDLE handle, const void *key,
*
*/
NTSTATUS
WINAPI
NtCreateIoCompletion
(
PHANDLE
CompletionPort
,
ACCESS_MASK
DesiredAccess
,
POBJECT_ATTRIBUTES
ObjectAttributes
,
ULONG
NumberOfConcurrentThreads
)
POBJECT_ATTRIBUTES
attr
,
ULONG
NumberOfConcurrentThreads
)
{
NTSTATUS
status
;
data_size_t
len
;
struct
object_attributes
*
objattr
;
TRACE
(
"(%p, %x, %p, %d)
\n
"
,
CompletionPort
,
DesiredAccess
,
ObjectAttributes
,
NumberOfConcurrentThreads
);
TRACE
(
"(%p, %x, %p, %d)
\n
"
,
CompletionPort
,
DesiredAccess
,
attr
,
NumberOfConcurrentThreads
);
if
(
!
CompletionPort
)
return
STATUS_INVALID_PARAMETER
;
if
((
status
=
alloc_object_attributes
(
attr
,
&
objattr
,
&
len
)))
return
status
;
SERVER_START_REQ
(
create_completion
)
{
req
->
access
=
DesiredAccess
;
req
->
attributes
=
ObjectAttributes
?
ObjectAttributes
->
Attributes
:
0
;
req
->
rootdir
=
wine_server_obj_handle
(
ObjectAttributes
?
ObjectAttributes
->
RootDirectory
:
0
);
req
->
concurrent
=
NumberOfConcurrentThreads
;
if
(
ObjectAttributes
&&
ObjectAttributes
->
ObjectName
)
wine_server_add_data
(
req
,
ObjectAttributes
->
ObjectName
->
Buffer
,
ObjectAttributes
->
ObjectName
->
Length
);
wine_server_add_data
(
req
,
objattr
,
len
);
if
(
!
(
status
=
wine_server_call
(
req
)))
*
CompletionPort
=
wine_server_ptr_handle
(
reply
->
handle
);
}
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
return
status
;
}
...
...
include/wine/server_protocol.h
View file @
1eb69be3
...
...
@@ -4980,11 +4980,9 @@ struct create_completion_request
{
struct
request_header
__header
;
unsigned
int
access
;
unsigned
int
attributes
;
unsigned
int
concurrent
;
obj_handle_t
rootdir
;
/* VARARG(filename,unicode_str); */
char
__pad_28
[
4
];
/* VARARG(objattr,object_attributes); */
char
__pad_20
[
4
];
};
struct
create_completion_reply
{
...
...
@@ -6161,6 +6159,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 49
6
#define SERVER_PROTOCOL_VERSION 49
7
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/completion.c
View file @
1eb69be3
...
...
@@ -130,7 +130,9 @@ static unsigned int completion_map_access( struct object *obj, unsigned int acce
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
static
struct
completion
*
create_completion
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
unsigned
int
concurrent
)
static
struct
completion
*
create_completion
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
unsigned
int
concurrent
,
const
struct
security_descriptor
*
sd
)
{
struct
completion
*
completion
;
...
...
@@ -140,6 +142,9 @@ static struct completion *create_completion( struct directory *root, const struc
{
list_init
(
&
completion
->
queue
);
completion
->
depth
=
0
;
if
(
sd
)
default_set_sd
(
&
completion
->
obj
,
sd
,
OWNER_SECURITY_INFORMATION
|
GROUP_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
|
SACL_SECURITY_INFORMATION
);
}
}
...
...
@@ -175,16 +180,15 @@ DECL_HANDLER(create_completion)
struct
completion
*
completion
;
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
(
(
completion
=
create_completion
(
root
,
&
name
,
req
->
attributes
,
req
->
concurrent
))
!=
NULL
)
if
(
(
completion
=
create_completion
(
root
,
&
name
,
objattr
->
attributes
,
req
->
concurrent
,
sd
))
)
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
completion
,
req
->
access
,
req
->
attributes
);
reply
->
handle
=
alloc_handle
(
current
->
process
,
completion
,
req
->
access
,
objattr
->
attributes
);
release_object
(
completion
);
}
...
...
server/protocol.def
View file @
1eb69be3
...
...
@@ -3466,10 +3466,8 @@ struct handle_info
/* Create I/O completion port */
@REQ(create_completion)
unsigned int access; /* desired access to a port */
unsigned int attributes; /* object attributes */
unsigned int concurrent; /* max number of concurrent active threads */
obj_handle_t rootdir; /* root directory */
VARARG(filename,unicode_str); /* port name */
VARARG(objattr,object_attributes); /* object attributes */
@REPLY
obj_handle_t handle; /* port handle */
@END
...
...
server/request.h
View file @
1eb69be3
...
...
@@ -2182,10 +2182,8 @@ C_ASSERT( FIELD_OFFSET(struct get_token_statistics_reply, group_count) == 32 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_token_statistics_reply
,
privilege_count
)
==
36
);
C_ASSERT
(
sizeof
(
struct
get_token_statistics_reply
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_completion_request
,
access
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_completion_request
,
attributes
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_completion_request
,
concurrent
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_completion_request
,
rootdir
)
==
24
);
C_ASSERT
(
sizeof
(
struct
create_completion_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_completion_request
,
concurrent
)
==
16
);
C_ASSERT
(
sizeof
(
struct
create_completion_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_completion_reply
,
handle
)
==
8
);
C_ASSERT
(
sizeof
(
struct
create_completion_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
open_completion_request
,
access
)
==
12
);
...
...
server/trace.c
View file @
1eb69be3
...
...
@@ -4087,10 +4087,8 @@ static void dump_get_token_statistics_reply( const struct get_token_statistics_r
static
void
dump_create_completion_request
(
const
struct
create_completion_request
*
req
)
{
fprintf
(
stderr
,
" access=%08x"
,
req
->
access
);
fprintf
(
stderr
,
", attributes=%08x"
,
req
->
attributes
);
fprintf
(
stderr
,
", concurrent=%08x"
,
req
->
concurrent
);
fprintf
(
stderr
,
", rootdir=%04x"
,
req
->
rootdir
);
dump_varargs_unicode_str
(
", filename="
,
cur_size
);
dump_varargs_object_attributes
(
", objattr="
,
cur_size
);
}
static
void
dump_create_completion_reply
(
const
struct
create_completion_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