summaryrefslogtreecommitdiff
path: root/source3/rpc_server
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
commitb2bc2bfaf056bdafd14513a0a6d1daef3d327ffc (patch)
treed3527784602fbf59c8a44b4c7b546452853a2e2c /source3/rpc_server
parent1f467d320036acae2c392619f84874894a4715a9 (diff)
downloadsamba-b2bc2bfaf056bdafd14513a0a6d1daef3d327ffc.tar.gz
samba-b2bc2bfaf056bdafd14513a0a6d1daef3d327ffc.tar.bz2
samba-b2bc2bfaf056bdafd14513a0a6d1daef3d327ffc.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. (This used to be commit dde795154cdc33cb8d6f0dfe9ae2712f7f8be3a7)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c10
1 files 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;