summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-01-04 15:59:57 +0000
committerLuke Leighton <lkcl@samba.org>2000-01-04 15:59:57 +0000
commitac9c6994e02ff0a204a19931c4c118c5f1028479 (patch)
treea8a3c72b2ebe7f94ab01d940bf8629357aa46452 /source3/rpc_server
parent528399a8a2a0903e6b8a9de0e3ac07f1f0b5f21b (diff)
downloadsamba-ac9c6994e02ff0a204a19931c4c118c5f1028479.tar.gz
samba-ac9c6994e02ff0a204a19931c4c118c5f1028479.tar.bz2
samba-ac9c6994e02ff0a204a19931c4c118c5f1028479.zip
using read_with_timeout(), min data size 16 bytes (DCE/RPC header), max
size of SMBtrans response, timeout of 10 seconds. read_data() _certainly_ doesn't work, as you don't know what size of the data is going to come back that needs to be fed back in the SMBtrans response. yes, oops :-) (This used to be commit 70d6f7635776bba98c9c09405eff6c2087dac590)
Diffstat (limited to 'source3/rpc_server')
-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;