Custom named pipes

jra at dp.samba.org jra at dp.samba.org
Fri Sep 13 22:12:00 GMT 2002


On Sat, Sep 14, 2002 at 12:08:21AM +0200, Gerry Jacobs wrote:
> 
> Btw I think I found a bug in the reply_pipe_write_and_X in smbd/pipes.c.
> I suppose that this function is only used for reading pure data from named
> pipes. But in this function you do a reply (write_to_pipe).
> When I sent a large string (> RPC_HEADER_LEN), I ran into trouble.
> The string was somewhere parsed in smaller parts. Each part was checked for
> a correct RPC header.
> But I was sending pure data without any headers and this was causing some
> errors. Anyway, I changed the following 2 lines in that function:
> 
>    // nrwritten=write_to_pipe(p,data,numtowrite);
>    nrwritten=numtowrite;
> 
> With these changes, I was able to send 10K with no problems.
> But as I said, I don't know if this function is used for some other
> SMB functions.

Yeah you can't do that. RPC traffic has to be broken up into PDU
sized units - each with it's own RPC header. You will break the
other named pipes by doing this.

Jeremy.



More information about the samba-technical mailing list