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
c4843d4a
Commit
c4843d4a
authored
Jan 19, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add a helper function to skip the object attributes structure.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d9e6a31c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
file.c
server/file.c
+1
-2
request.c
server/request.c
+9
-0
request.h
server/request.h
+1
-0
symlink.c
server/symlink.c
+2
-3
No files found.
server/file.c
View file @
c4843d4a
...
...
@@ -711,8 +711,7 @@ DECL_HANDLER(create_file)
if
(
!
root_fd
)
return
;
}
name
=
(
const
char
*
)
get_req_data
()
+
sizeof
(
*
objattr
)
+
objattr
->
sd_len
;
name_len
=
get_req_data_size
()
-
sizeof
(
*
objattr
)
-
objattr
->
sd_len
;
name
=
get_req_data_after_objattr
(
objattr
,
&
name_len
);
reply
->
handle
=
0
;
if
((
file
=
create_file
(
root_fd
,
name
,
name_len
,
req
->
access
,
req
->
sharing
,
...
...
server/request.c
View file @
c4843d4a
...
...
@@ -198,6 +198,15 @@ const struct object_attributes *get_req_object_attributes( const struct security
return
attr
;
}
/* return a pointer to the request data following an object attributes structure */
const
void
*
get_req_data_after_objattr
(
const
struct
object_attributes
*
attr
,
data_size_t
*
len
)
{
const
void
*
ptr
=
(
const
WCHAR
*
)((
const
struct
object_attributes
*
)
get_req_data
()
+
1
)
+
attr
->
sd_len
/
sizeof
(
WCHAR
)
+
attr
->
name_len
/
sizeof
(
WCHAR
);
*
len
=
get_req_data_size
()
-
((
const
char
*
)
ptr
-
(
const
char
*
)
get_req_data
());
return
ptr
;
}
/* write the remaining part of the reply */
void
write_reply
(
struct
thread
*
thread
)
{
...
...
server/request.h
View file @
c4843d4a
...
...
@@ -48,6 +48,7 @@ extern const char *get_config_dir(void);
extern
void
*
set_reply_data_size
(
data_size_t
size
);
extern
const
struct
object_attributes
*
get_req_object_attributes
(
const
struct
security_descriptor
**
sd
,
struct
unicode_str
*
name
);
extern
const
void
*
get_req_data_after_objattr
(
const
struct
object_attributes
*
attr
,
data_size_t
*
len
);
extern
int
receive_fd
(
struct
process
*
process
);
extern
int
send_client_fd
(
struct
process
*
process
,
int
fd
,
obj_handle_t
handle
);
extern
void
read_request
(
struct
thread
*
thread
);
...
...
server/symlink.c
View file @
c4843d4a
...
...
@@ -174,9 +174,8 @@ DECL_HANDLER(create_symlink)
if
(
!
objattr
)
return
;
target
.
str
=
(
const
WCHAR
*
)
get_req_data
()
+
sizeof
(
*
objattr
)
/
sizeof
(
WCHAR
)
+
objattr
->
sd_len
/
sizeof
(
WCHAR
)
+
name
.
len
/
sizeof
(
WCHAR
);
target
.
len
=
get_req_data_size
()
-
((
const
char
*
)
target
.
str
-
(
const
char
*
)
get_req_data
());
target
.
str
=
get_req_data_after_objattr
(
objattr
,
&
target
.
len
);
target
.
len
=
(
target
.
len
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
);
if
(
objattr
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
objattr
->
rootdir
,
0
)))
return
;
...
...
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