server: Added access rights mapping to synchronization objects.
diff --git a/server/timer.c b/server/timer.c
index 7c20f19..b87dd88 100644
--- a/server/timer.c
+++ b/server/timer.c
@@ -53,6 +53,7 @@
 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 @@
     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 @@
     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;