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
4c763a41
Commit
4c763a41
authored
Jan 15, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Allow the object attributes to be omitted in requests.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9504e2ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
sync.c
dlls/ntdll/sync.c
+1
-7
server_protocol.h
include/wine/server_protocol.h
+1
-1
request.c
server/request.c
+8
-0
trace.c
server/trace.c
+13
-9
No files found.
dlls/ntdll/sync.c
View file @
4c763a41
...
...
@@ -86,13 +86,7 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
*
ret
=
NULL
;
*
ret_len
=
0
;
if
(
!
attr
)
{
*
ret
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
if
(
!*
ret
)
return
STATUS_NO_MEMORY
;
*
ret_len
=
len
;
return
STATUS_SUCCESS
;
}
if
(
!
attr
)
return
STATUS_SUCCESS
;
if
((
sd
=
attr
->
SecurityDescriptor
))
{
...
...
include/wine/server_protocol.h
View file @
4c763a41
...
...
@@ -6171,6 +6171,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 49
3
#define SERVER_PROTOCOL_VERSION 49
4
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/request.c
View file @
4c763a41
...
...
@@ -169,9 +169,17 @@ void *set_reply_data_size( data_size_t size )
const
struct
object_attributes
*
get_req_object_attributes
(
const
struct
security_descriptor
**
sd
,
struct
unicode_str
*
name
)
{
static
const
struct
object_attributes
empty_attributes
;
const
struct
object_attributes
*
attr
=
get_req_data
();
data_size_t
size
=
get_req_data_size
();
if
(
!
size
)
{
*
sd
=
NULL
;
name
->
len
=
0
;
return
&
empty_attributes
;
}
if
((
size
<
sizeof
(
*
attr
))
||
(
size
-
sizeof
(
*
attr
)
<
attr
->
sd_len
)
||
(
size
-
sizeof
(
*
attr
)
-
attr
->
sd_len
<
attr
->
name_len
))
{
...
...
server/trace.c
View file @
4c763a41
...
...
@@ -1074,20 +1074,27 @@ static void dump_varargs_object_attributes( const char *prefix, data_size_t size
const
struct
object_attributes
*
objattr
=
cur_data
;
fprintf
(
stderr
,
"%s{"
,
prefix
);
if
(
size
>=
sizeof
(
struct
object_attributes
)
)
if
(
size
)
{
const
WCHAR
*
str
;
fprintf
(
stderr
,
"rootdir=%04x,attributes=%08x"
,
objattr
->
rootdir
,
objattr
->
attributes
);
if
(
objattr
->
sd_len
>
size
-
sizeof
(
*
objattr
)
||
objattr
->
name_len
>
size
-
sizeof
(
*
objattr
)
-
objattr
->
sd_len
)
if
(
size
<
sizeof
(
*
objattr
)
||
(
size
-
sizeof
(
*
objattr
)
<
objattr
->
sd_len
)
||
(
size
-
sizeof
(
*
objattr
)
-
objattr
->
sd_len
<
objattr
->
name_len
))
{
fprintf
(
stderr
,
"***invalid***}"
);
remove_data
(
size
);
return
;
}
fprintf
(
stderr
,
"rootdir=%04x,attributes=%08x"
,
objattr
->
rootdir
,
objattr
->
attributes
);
dump_inline_security_descriptor
(
",sd="
,
(
const
struct
security_descriptor
*
)(
objattr
+
1
),
objattr
->
sd_len
);
str
=
(
const
WCHAR
*
)
objattr
+
(
sizeof
(
*
objattr
)
+
objattr
->
sd_len
)
/
sizeof
(
WCHAR
);
fprintf
(
stderr
,
",name=L
\"
"
);
dump_strW
(
str
,
objattr
->
name_len
/
sizeof
(
WCHAR
),
stderr
,
"
\"\"
"
);
fputc
(
'\"'
,
stderr
);
remove_data
(
((
sizeof
(
*
objattr
)
+
objattr
->
sd_len
)
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
)
+
objattr
->
name_len
);
(
objattr
->
name_len
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
)
);
}
fputc
(
'}'
,
stderr
);
}
...
...
@@ -3928,10 +3935,7 @@ static void dump_get_directory_entry_reply( const struct get_directory_entry_rep
static
void
dump_create_symlink_request
(
const
struct
create_symlink_request
*
req
)
{
fprintf
(
stderr
,
" access=%08x"
,
req
->
access
);
fprintf
(
stderr
,
", attributes=%08x"
,
req
->
attributes
);
fprintf
(
stderr
,
", rootdir=%04x"
,
req
->
rootdir
);
fprintf
(
stderr
,
", name_len=%u"
,
req
->
name_len
);
dump_varargs_unicode_str
(
", name="
,
min
(
cur_size
,
req
->
name_len
)
);
dump_varargs_object_attributes
(
", objattr="
,
cur_size
);
dump_varargs_unicode_str
(
", target_name="
,
cur_size
);
}
...
...
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