Rebase against b21a3240705fdaf9f70a0eb1d2ff4736efcd35c9.

This commit is contained in:
Sebastian Lackner
2016-02-05 19:52:28 +01:00
parent f6e35db051
commit 750454d6f1
8 changed files with 324 additions and 262 deletions

View File

@@ -1,4 +1,4 @@
From 4ae4e05064134eb80698a6cb3c2bfe77a50997c1 Mon Sep 17 00:00:00 2001
From 6f7aea78c09e8c1ef0e93aef214ac28fe223d544 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 4 Aug 2014 05:01:11 +0200
Subject: server: Use SOCK_SEQPACKET socket in combination with SO_PEEK_OFF to
@@ -329,7 +329,7 @@ index eef36ad..420984c 100644
if (needs_close) close( fd );
}
diff --git a/server/named_pipe.c b/server/named_pipe.c
index ee6008c..9cc3939 100644
index 3e1eff0..3d9917f 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -42,6 +42,10 @@
@@ -351,8 +351,8 @@ index ee6008c..9cc3939 100644
#include "handle.h"
#include "thread.h"
#include "request.h"
@@ -782,14 +787,43 @@ static struct pipe_server *find_available_server( struct named_pipe *pipe )
return NULL;
@@ -799,14 +804,43 @@ static int named_pipe_link_name( struct object *obj, struct object_name *name, s
return 1;
}
+/* check if message mode named pipes are supported */
@@ -396,7 +396,7 @@ index ee6008c..9cc3939 100644
if (!(server = find_available_server( pipe )))
{
@@ -808,7 +842,10 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
@@ -825,7 +859,10 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
if ((client = create_pipe_client( options, pipe->flags )))
{
@@ -408,7 +408,7 @@ index ee6008c..9cc3939 100644
{
assert( !server->fd );
@@ -818,32 +855,55 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
@@ -835,32 +872,55 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
if (is_overlapped( options )) fcntl( fds[1], F_SETFL, O_NONBLOCK );
if (is_overlapped( server->options )) fcntl( fds[0], F_SETFL, O_NONBLOCK );
@@ -483,7 +483,7 @@ index ee6008c..9cc3939 100644
release_object( client );
client = NULL;
}
@@ -934,7 +994,7 @@ DECL_HANDLER(create_named_pipe)
@@ -951,7 +1011,7 @@ DECL_HANDLER(create_named_pipe)
return;
}
@@ -492,7 +492,7 @@ index ee6008c..9cc3939 100644
if (!name.len) /* pipes need a root directory even without a name */
{
@@ -1037,6 +1097,9 @@ DECL_HANDLER(set_named_pipe_info)
@@ -1054,6 +1114,9 @@ DECL_HANDLER(set_named_pipe_info)
{
struct pipe_server *server;
struct pipe_client *client = NULL;
@@ -502,7 +502,7 @@ index ee6008c..9cc3939 100644
server = get_pipe_server_obj( current->process, req->handle, FILE_WRITE_ATTRIBUTES );
if (!server)
@@ -1063,10 +1126,20 @@ DECL_HANDLER(set_named_pipe_info)
@@ -1080,10 +1143,20 @@ DECL_HANDLER(set_named_pipe_info)
else if (client)
{
client->pipe_flags = server->pipe->flags | req->flags;
@@ -524,7 +524,7 @@ index ee6008c..9cc3939 100644
if (client)
diff --git a/server/sock.c b/server/sock.c
index 57d3d93..ede97d9 100644
index a11964f..0a2e079 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -61,6 +61,7 @@
@@ -543,7 +543,7 @@ index 57d3d93..ede97d9 100644
static const struct object_ops sock_ops =
{
@@ -956,7 +956,7 @@ static int sock_get_ntstatus( int err )
@@ -958,7 +958,7 @@ static int sock_get_ntstatus( int err )
}
/* set the last error depending on errno */