server: PIPE_TYPE_BYTE | PIPE_READMODE_MESSAGE is invalid for named pipes.
diff --git a/server/named_pipe.c b/server/named_pipe.c
index d720b17..590adca 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -950,7 +950,8 @@
struct unicode_str name;
struct directory *root = NULL;
- if (!req->sharing || (req->sharing & ~(FILE_SHARE_READ | FILE_SHARE_WRITE)))
+ if (!req->sharing || (req->sharing & ~(FILE_SHARE_READ | FILE_SHARE_WRITE)) ||
+ (!(req->flags & NAMED_PIPE_MESSAGE_STREAM_WRITE) && (req->flags & NAMED_PIPE_MESSAGE_STREAM_READ)))
{
set_error( STATUS_INVALID_PARAMETER );
return;