server: Added access rights mapping to synchronization objects.
diff --git a/server/event.c b/server/event.c
index d6c8fef..6aec64a 100644
--- a/server/event.c
+++ b/server/event.c
@@ -45,6 +45,7 @@
 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 @@
     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 @@
     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;