Implemented the ntdll virtual memory functions, and made the kernel
functions use them.

diff --git a/server/mapping.c b/server/mapping.c
index 0c7e4d9..d9e79c6 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -375,9 +375,7 @@
                                req->protect, req->file_handle,
                                get_req_data(), get_req_data_size() )))
     {
-        int access = FILE_MAP_ALL_ACCESS;
-        if (!(req->protect & VPROT_WRITE)) access &= ~FILE_MAP_WRITE;
-        reply->handle = alloc_handle( current->process, obj, access, req->inherit );
+        reply->handle = alloc_handle( current->process, obj, req->access, req->inherit );
         release_object( obj );
     }
 }
diff --git a/server/protocol.def b/server/protocol.def
index 9d4f8f3..fd526e6 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1043,6 +1043,7 @@
     int          size_high;     /* mapping size */
     int          size_low;      /* mapping size */
     int          protect;       /* protection flags (see below) */
+    unsigned int access;        /* wanted access rights */
     int          inherit;       /* inherit flag */
     obj_handle_t file_handle;   /* file handle */
     VARARG(name,unicode_str);   /* object name */
diff --git a/server/trace.c b/server/trace.c
index c96863d..864e146 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1213,6 +1213,7 @@
     fprintf( stderr, " size_high=%d,", req->size_high );
     fprintf( stderr, " size_low=%d,", req->size_low );
     fprintf( stderr, " protect=%d,", req->protect );
+    fprintf( stderr, " access=%08x,", req->access );
     fprintf( stderr, " inherit=%d,", req->inherit );
     fprintf( stderr, " file_handle=%d,", req->file_handle );
     fprintf( stderr, " name=" );