summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-11 04:33:05 +0000
committerJeremy Allison <jra@samba.org>2001-03-11 04:33:05 +0000
commitdde795154cdc33cb8d6f0dfe9ae2712f7f8be3a7 (patch)
tree198a760e2eae80de8daed95a850ab1f603268fca
parent73c7ace168e4aa6a47b366cf40ed6743a21d3638 (diff)
downloadsamba-dde795154cdc33cb8d6f0dfe9ae2712f7f8be3a7.tar.gz
samba-dde795154cdc33cb8d6f0dfe9ae2712f7f8be3a7.tar.xz
samba-dde795154cdc33cb8d6f0dfe9ae2712f7f8be3a7.zip
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.
-rw-r--r--source/rpc_server/srv_pipe_hnd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c
index cd072122f3f..8846761316e 100644
--- a/source/rpc_server/srv_pipe_hnd.c
+++ b/source/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;