From b2bc2bfaf056bdafd14513a0a6d1daef3d327ffc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 11 Mar 2001 04:33:05 +0000 Subject: Ensure we're checking for the "FIRST" flag in other types of PDU than "REQUEST" (ie. BIND, BINDRESP and ALTERCONTEXT) - if we don't do this then we don't set the endianness flag correctly for these PDU's. Herb - this should fix the bug you reported to me today. Jeremy. (This used to be commit dde795154cdc33cb8d6f0dfe9ae2712f7f8be3a7) --- source3/rpc_server/srv_pipe_hnd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index cd072122f3..8846761316 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -322,11 +322,10 @@ static ssize_t unmarshall_rpc_header(pipes_struct *p) } /* - * If there's not data in the incoming buffer and it's a - * request PDU this should be the start of a new RPC. + * If there's not data in the incoming buffer this should be the start of a new RPC. */ - if((p->hdr.pkt_type == RPC_REQUEST) && (prs_offset(&p->in_data.data) == 0)) { + if(prs_offset(&p->in_data.data) == 0) { if (!(p->hdr.flags & RPC_FLG_FIRST)) { /* @@ -348,6 +347,9 @@ static ssize_t unmarshall_rpc_header(pipes_struct *p) p->endian = rpc_in.bigendian_data; + DEBUG(5,("unmarshall_rpc_header: using %sendian RPC\n", + p->endian == RPC_LITTLE_ENDIAN ? "little-" : "big-" )); + } else { /* @@ -356,7 +358,7 @@ static ssize_t unmarshall_rpc_header(pipes_struct *p) */ if (p->endian != rpc_in.bigendian_data) { - DEBUG(0,("unmarshall_rpc_header: FIRST endianness flag different in next PDU !\n")); + DEBUG(0,("unmarshall_rpc_header: FIRST endianness flag (%d) different in next PDU !\n", (int)p->endian)); set_incoming_fault(p); prs_mem_free(&rpc_in); return -1; -- cgit