summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_pipe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 49733b0767..f8439de9a7 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -68,7 +68,11 @@ BOOL readwrite_pipe(pipes_struct *p, char *data, int len,
{
return False;
}
- (*rlen) = read_data(p->m->fd, (*rdata), (*rlen));
+
+ /* read a minimum of an rpc header, then wait for up to 10 seconds
+ * to read up to a maximum of the SMBtrans max data size
+ */
+ (*rlen) = read_with_timeout(p->m->fd, (*rdata), 16, (*rlen), 10000);
if ((*rlen) < 0)
{
return False;