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
875d112d
Commit
875d112d
authored
Feb 28, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed dst_handle in duplicate_handle request.
Added inherit flag in create_mapping request.
parent
bc5477f7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
36 deletions
+8
-36
server.h
include/server.h
+1
-1
process.h
include/server/process.h
+1
-1
client.c
scheduler/client.c
+0
-1
process.c
server/process.c
+2
-29
request.c
server/request.c
+3
-3
trace.c
server/trace.c
+1
-1
No files found.
include/server.h
View file @
875d112d
...
...
@@ -201,7 +201,6 @@ struct dup_handle_request
int
src_process
;
/* src process handle */
int
src_handle
;
/* src handle to duplicate */
int
dst_process
;
/* dst process handle */
int
dst_handle
;
/* handle to duplicate to (or -1 for any) */
unsigned
int
access
;
/* wanted access rights */
int
inherit
;
/* inherit flag */
int
options
;
/* duplicate options (see below) */
...
...
@@ -573,6 +572,7 @@ struct create_mapping_request
int
size_high
;
/* mapping size */
int
size_low
;
/* mapping size */
int
protect
;
/* protection flags (see below) */
int
inherit
;
/* inherit flag */
int
handle
;
/* file handle */
char
name
[
0
];
/* object name */
};
...
...
include/server/process.h
View file @
875d112d
...
...
@@ -56,7 +56,7 @@ extern int set_handle_info( struct process *process, int handle,
extern
struct
object
*
get_handle_obj
(
struct
process
*
process
,
int
handle
,
unsigned
int
access
,
const
struct
object_ops
*
ops
);
extern
int
duplicate_handle
(
struct
process
*
src
,
int
src_handle
,
struct
process
*
dst
,
int
dst_handle
,
unsigned
int
access
,
int
inherit
,
int
options
);
unsigned
int
access
,
int
inherit
,
int
options
);
extern
int
open_object
(
const
char
*
name
,
const
struct
object_ops
*
ops
,
unsigned
int
access
,
int
inherit
);
...
...
scheduler/client.c
View file @
875d112d
...
...
@@ -356,7 +356,6 @@ int CLIENT_DuplicateHandle( int src_process, int src_handle, int dst_process, in
req
.
src_process
=
src_process
;
req
.
src_handle
=
src_handle
;
req
.
dst_process
=
dst_process
;
req
.
dst_handle
=
dst_handle
;
req
.
access
=
access
;
req
.
inherit
=
inherit
;
req
.
options
=
options
;
...
...
server/process.c
View file @
875d112d
...
...
@@ -288,33 +288,6 @@ int alloc_handle( struct process *process, void *obj, unsigned int access,
return
handle
+
1
;
/* avoid handle 0 */
}
/* allocate a specific handle for an object, incrementing its refcount */
static
int
alloc_specific_handle
(
struct
process
*
process
,
void
*
obj
,
int
handle
,
unsigned
int
access
,
int
inherit
)
{
struct
handle_entry
*
entry
;
struct
object
*
old
;
if
(
handle
==
-
1
)
return
alloc_handle
(
process
,
obj
,
access
,
inherit
);
assert
(
!
(
access
&
RESERVED_ALL
)
);
if
(
inherit
)
access
|=
RESERVED_INHERIT
;
handle
--
;
/* handles start at 1 */
if
((
handle
<
0
)
||
(
handle
>
process
->
handle_last
))
{
SET_ERROR
(
ERROR_INVALID_HANDLE
);
return
-
1
;
}
entry
=
process
->
entries
+
handle
;
old
=
entry
->
ptr
;
entry
->
ptr
=
grab_object
(
obj
);
entry
->
access
=
access
;
if
(
old
)
release_object
(
old
);
return
handle
+
1
;
}
/* return an handle entry, or NULL if the handle is invalid */
static
struct
handle_entry
*
get_handle
(
struct
process
*
process
,
int
handle
)
{
...
...
@@ -469,7 +442,7 @@ int set_handle_info( struct process *process, int handle, int mask, int flags )
/* duplicate a handle */
int
duplicate_handle
(
struct
process
*
src
,
int
src_handle
,
struct
process
*
dst
,
int
dst_handle
,
unsigned
int
access
,
int
inherit
,
int
options
)
unsigned
int
access
,
int
inherit
,
int
options
)
{
int
res
;
struct
handle_entry
*
entry
=
get_handle
(
src
,
src_handle
);
...
...
@@ -478,7 +451,7 @@ int duplicate_handle( struct process *src, int src_handle, struct process *dst,
if
(
options
&
DUP_HANDLE_SAME_ACCESS
)
access
=
entry
->
access
;
if
(
options
&
DUP_HANDLE_MAKE_GLOBAL
)
dst
=
initial_process
;
access
&=
~
RESERVED_ALL
;
res
=
alloc_
specific_handle
(
dst
,
entry
->
ptr
,
dst_handle
,
access
,
inherit
);
res
=
alloc_
handle
(
dst
,
entry
->
ptr
,
access
,
inherit
);
if
(
options
&
DUP_HANDLE_MAKE_GLOBAL
)
res
=
HANDLE_LOCAL_TO_GLOBAL
(
res
);
return
res
;
}
...
...
server/request.c
View file @
875d112d
...
...
@@ -223,12 +223,12 @@ DECL_HANDLER(dup_handle)
{
if
(
req
->
options
&
DUP_HANDLE_MAKE_GLOBAL
)
{
reply
.
handle
=
duplicate_handle
(
src
,
req
->
src_handle
,
NULL
,
-
1
,
reply
.
handle
=
duplicate_handle
(
src
,
req
->
src_handle
,
NULL
,
req
->
access
,
req
->
inherit
,
req
->
options
);
}
else
if
((
dst
=
get_process_from_handle
(
req
->
dst_process
,
PROCESS_DUP_HANDLE
)))
{
reply
.
handle
=
duplicate_handle
(
src
,
req
->
src_handle
,
dst
,
req
->
dst_handle
,
reply
.
handle
=
duplicate_handle
(
src
,
req
->
src_handle
,
dst
,
req
->
access
,
req
->
inherit
,
req
->
options
);
release_object
(
dst
);
}
...
...
@@ -742,7 +742,7 @@ DECL_HANDLER(create_mapping)
{
int
access
=
FILE_MAP_ALL_ACCESS
;
if
(
!
(
req
->
protect
&
VPROT_WRITE
))
access
&=
~
FILE_MAP_WRITE
;
reply
.
handle
=
alloc_handle
(
current
->
process
,
obj
,
access
,
0
);
reply
.
handle
=
alloc_handle
(
current
->
process
,
obj
,
access
,
req
->
inherit
);
release_object
(
obj
);
}
send_reply
(
current
,
-
1
,
1
,
&
reply
,
sizeof
(
reply
)
);
...
...
server/trace.c
View file @
875d112d
...
...
@@ -159,7 +159,6 @@ static int dump_dup_handle_request( struct dup_handle_request *req, int len )
fprintf
(
stderr
,
" src_process=%d,"
,
req
->
src_process
);
fprintf
(
stderr
,
" src_handle=%d,"
,
req
->
src_handle
);
fprintf
(
stderr
,
" dst_process=%d,"
,
req
->
dst_process
);
fprintf
(
stderr
,
" dst_handle=%d,"
,
req
->
dst_handle
);
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" inherit=%d,"
,
req
->
inherit
);
fprintf
(
stderr
,
" options=%d"
,
req
->
options
);
...
...
@@ -522,6 +521,7 @@ static int dump_create_mapping_request( struct create_mapping_request *req, int
fprintf
(
stderr
,
" size_high=%d,"
,
req
->
size_high
);
fprintf
(
stderr
,
" size_low=%d,"
,
req
->
size_low
);
fprintf
(
stderr
,
" protect=%d,"
,
req
->
protect
);
fprintf
(
stderr
,
" inherit=%d,"
,
req
->
inherit
);
fprintf
(
stderr
,
" handle=%d,"
,
req
->
handle
);
fprintf
(
stderr
,
" name=
\"
%.*s
\"
"
,
len
-
(
int
)
sizeof
(
*
req
),
(
char
*
)(
req
+
1
)
);
return
len
;
...
...
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