- Send whole OBJECT_ATTRIBUTES.Attributes to the server not just an
  inherit flag.
- Pass DesiredAccess to the server when creating mailslot.

diff --git a/server/mapping.c b/server/mapping.c
index 81e4806..7edba4c 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -29,6 +29,7 @@
 #include <unistd.h>
 
 #include "windef.h"
+#include "winternl.h"
 
 #include "file.h"
 #include "handle.h"
@@ -379,7 +380,8 @@
     if ((obj = create_mapping( size, req->protect, req->file_handle,
                                get_req_data(), get_req_data_size() )))
     {
-        reply->handle = alloc_handle( current->process, obj, req->access, req->inherit );
+        reply->handle = alloc_handle( current->process, obj, req->access,
+                                      req->attributes & OBJ_INHERIT );
         release_object( obj );
     }
 }
@@ -388,7 +390,7 @@
 DECL_HANDLER(open_mapping)
 {
     reply->handle = open_object( sync_namespace, get_req_data(), get_req_data_size(),
-                                 &mapping_ops, req->access, req->inherit );
+                                 &mapping_ops, req->access, req->attributes );
 }
 
 /* get a mapping information */