- now passing access rights when creating a named pipe in NTDLL
- reimplemented Kernel32.CreatePipe purely on top of NTDLL APIs
- anonymous pipe handles should have the SYNCHRONIZE bit set

diff --git a/server/named_pipe.c b/server/named_pipe.c
index 55a8ee0..ba56d2f 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -583,7 +583,7 @@
     if (server)
     {
         reply->handle = alloc_handle( current->process, server,
-                                      GENERIC_READ|GENERIC_WRITE, req->inherit );
+                                      req->access, req->inherit );
         server->pipe->instances++;
         release_object( server );
     }
diff --git a/server/protocol.def b/server/protocol.def
index 9e93f53..118ffc0 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1680,6 +1680,7 @@
 
 /* Create a named pipe */
 @REQ(create_named_pipe)
+    unsigned int   access;
     unsigned int   options;
     unsigned int   flags;
     unsigned int   maxinstances;
diff --git a/server/trace.c b/server/trace.c
index 2c00f2e..4a28595 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2140,6 +2140,7 @@
 
 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
 {
+    fprintf( stderr, " access=%08x,", req->access );
     fprintf( stderr, " options=%08x,", req->options );
     fprintf( stderr, " flags=%08x,", req->flags );
     fprintf( stderr, " maxinstances=%08x,", req->maxinstances );