r4330: Fix for bug found by Rob Foehl <rwf@loonybin.net>. Remember to
authorJeremy Allison <jra@samba.org>
Tue, 21 Dec 2004 23:14:20 +0000 (23:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:44 +0000 (10:53 -0500)
add in the bcc length for readX on named pipes.
Jeremy.
(This used to be commit 1168395e6a543c51f684280b00fb8c9b8bbc6ec0)

source3/smbd/pipes.c

index f7e9c595c13bf8f35d7f97c02b10dd61d4e8ffea..6c7faa4c056181af166bcb1ef73759f17e6bd022 100644 (file)
@@ -241,6 +241,8 @@ int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize)
        DEBUG(3,("readX-IPC pnum=%04x min=%d max=%d nread=%d\n",
                 p->pnum, smb_mincnt, smb_maxcnt, nread));
 
+       /* Ensure we set up the message length to include the data length read. */
+       set_message_bcc(outbuf,nread);
        return chain_reply(inbuf,outbuf,length,bufsize);
 }