Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
03f46e13
Commit
03f46e13
authored
Dec 12, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Added access rights mapping to synchronization objects.
parent
28beba31
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
4 deletions
+44
-4
event.c
server/event.c
+11
-1
mutex.c
server/mutex.c
+11
-1
semaphore.c
server/semaphore.c
+11
-1
timer.c
server/timer.c
+11
-1
No files found.
server/event.c
View file @
03f46e13
...
...
@@ -45,6 +45,7 @@ struct event
static
void
event_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
event_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
int
event_satisfied
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
unsigned
int
event_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
int
event_signal
(
struct
object
*
obj
,
unsigned
int
access
);
static
const
struct
object_ops
event_ops
=
...
...
@@ -57,7 +58,7 @@ static const struct object_ops event_ops =
event_satisfied
,
/* satisfied */
event_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
event_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no_close_handle
,
/* close_handle */
no_destroy
/* destroy */
...
...
@@ -132,6 +133,15 @@ static int event_satisfied( struct object *obj, struct thread *thread )
return
0
;
/* Not abandoned */
}
static
unsigned
int
event_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
SYNCHRONIZE
|
EVENT_QUERY_STATE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_ALL
|
EVENT_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
static
int
event_signal
(
struct
object
*
obj
,
unsigned
int
access
)
{
struct
event
*
event
=
(
struct
event
*
)
obj
;
...
...
server/mutex.c
View file @
03f46e13
...
...
@@ -47,6 +47,7 @@ struct mutex
static
void
mutex_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
mutex_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
int
mutex_satisfied
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
unsigned
int
mutex_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
void
mutex_destroy
(
struct
object
*
obj
);
static
int
mutex_signal
(
struct
object
*
obj
,
unsigned
int
access
);
...
...
@@ -60,7 +61,7 @@ static const struct object_ops mutex_ops =
mutex_satisfied
,
/* satisfied */
mutex_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
mutex_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no_close_handle
,
/* close_handle */
mutex_destroy
/* destroy */
...
...
@@ -143,6 +144,15 @@ static int mutex_satisfied( struct object *obj, struct thread *thread )
return
1
;
}
static
unsigned
int
mutex_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
|
MUTEX_MODIFY_STATE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_ALL
|
MUTEX_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
static
int
mutex_signal
(
struct
object
*
obj
,
unsigned
int
access
)
{
struct
mutex
*
mutex
=
(
struct
mutex
*
)
obj
;
...
...
server/semaphore.c
View file @
03f46e13
...
...
@@ -45,6 +45,7 @@ struct semaphore
static
void
semaphore_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
semaphore_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
int
semaphore_satisfied
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
unsigned
int
semaphore_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
int
semaphore_signal
(
struct
object
*
obj
,
unsigned
int
access
);
static
const
struct
object_ops
semaphore_ops
=
...
...
@@ -57,7 +58,7 @@ static const struct object_ops semaphore_ops =
semaphore_satisfied
,
/* satisfied */
semaphore_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
semaphore_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no_close_handle
,
/* close_handle */
no_destroy
/* destroy */
...
...
@@ -133,6 +134,15 @@ static int semaphore_satisfied( struct object *obj, struct thread *thread )
return
0
;
/* not abandoned */
}
static
unsigned
int
semaphore_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
|
SEMAPHORE_MODIFY_STATE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_ALL
|
SEMAPHORE_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
static
int
semaphore_signal
(
struct
object
*
obj
,
unsigned
int
access
)
{
struct
semaphore
*
sem
=
(
struct
semaphore
*
)
obj
;
...
...
server/timer.c
View file @
03f46e13
...
...
@@ -53,6 +53,7 @@ struct timer
static
void
timer_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
timer_signaled
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
int
timer_satisfied
(
struct
object
*
obj
,
struct
thread
*
thread
);
static
unsigned
int
timer_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
void
timer_destroy
(
struct
object
*
obj
);
static
const
struct
object_ops
timer_ops
=
...
...
@@ -65,7 +66,7 @@ static const struct object_ops timer_ops =
timer_satisfied
,
/* satisfied */
no_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
timer_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no_close_handle
,
/* close_handle */
timer_destroy
/* destroy */
...
...
@@ -196,6 +197,15 @@ static int timer_satisfied( struct object *obj, struct thread *thread )
return
0
;
}
static
unsigned
int
timer_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
SYNCHRONIZE
|
TIMER_QUERY_STATE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
|
TIMER_MODIFY_STATE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_ALL
)
access
|=
TIMER_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
static
void
timer_destroy
(
struct
object
*
obj
)
{
struct
timer
*
timer
=
(
struct
timer
*
)
obj
;
...
...
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