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
46d1b3e8
Commit
46d1b3e8
authored
Dec 12, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Added access rights mapping to process and thread objects.
parent
32a93960
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
process.c
server/process.c
+11
-1
thread.c
server/thread.c
+11
-1
No files found.
server/process.c
View file @
46d1b3e8
...
...
@@ -59,6 +59,7 @@ static int running_processes;
static
void
process_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
process_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
unsigned
int
process_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
void
process_poll_event
(
struct
fd
*
fd
,
int
event
);
static
void
process_destroy
(
struct
object
*
obj
);
...
...
@@ -72,7 +73,7 @@ static const struct object_ops process_ops =
no_satisfied
,
/* satisfied */
no_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
process_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no_close_handle
,
/* close_handle */
process_destroy
/* destroy */
...
...
@@ -415,6 +416,15 @@ static int process_signaled( struct object *obj, struct thread *thread )
return
!
process
->
running_threads
;
}
static
unsigned
int
process_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
SYNCHRONIZE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
|
SYNCHRONIZE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_ALL
)
access
|=
PROCESS_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
static
void
process_poll_event
(
struct
fd
*
fd
,
int
event
)
{
struct
process
*
process
=
get_fd_user
(
fd
);
...
...
server/thread.c
View file @
46d1b3e8
...
...
@@ -83,6 +83,7 @@ struct thread_apc
static
void
dump_thread
(
struct
object
*
obj
,
int
verbose
);
static
int
thread_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
unsigned
int
thread_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
void
thread_poll_event
(
struct
fd
*
fd
,
int
event
);
static
void
destroy_thread
(
struct
object
*
obj
);
static
struct
thread_apc
*
thread_dequeue_apc
(
struct
thread
*
thread
,
int
system_only
);
...
...
@@ -97,7 +98,7 @@ static const struct object_ops thread_ops =
no_satisfied
,
/* satisfied */
no_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
thread_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no_close_handle
,
/* close_handle */
destroy_thread
/* destroy */
...
...
@@ -271,6 +272,15 @@ static int thread_signaled( struct object *obj, struct thread *thread )
return
(
mythread
->
state
==
TERMINATED
);
}
static
unsigned
int
thread_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
SYNCHRONIZE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
|
SYNCHRONIZE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_ALL
)
access
|=
THREAD_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
/* get a thread pointer from a thread id (and increment the refcount) */
struct
thread
*
get_thread_from_id
(
thread_id_t
id
)
{
...
...
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