Add queueing to np_read_state, simulate message-type named pipes.
authorVolker Lendecke <vl@samba.org>
Mon, 9 Feb 2009 07:10:09 +0000 (08:10 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 10 Feb 2009 17:29:34 +0000 (18:29 +0100)
commitf6e9f1e7ea7ac0fddf312f7fcd7a1478bde1c07f
treea3455a2575550879f756415a3d1d1575aa6cdffb
parent47cb572d401218d43f5e681fd8820517659b48c4
Add queueing to np_read_state, simulate message-type named pipes.

The problem with msg-type pipes is that we have to return short reads when a
message ends before the read request. When reading from the unix domain socket,
the message limits are lost. So we would happily return more than a message,
which confuses for example the s4 rpc client horribly. I'd expect other np rpc
clients also to blow up over this.

The real solution is to properly implement a two-byte length field per message
on the unix domain socket, but this requires more changes there. And as we
right now only serve DCE/RPC over the named pipes, this implements a hack that
looks into the fragment headers to figure out hdr.frag_len.
source3/rpc_server/srv_pipe_hnd.c