From 5107a7a96acf1949f5ae0cdc49e9c84570f3482a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Mar 2001 20:19:31 +0000 Subject: Ok - we're now sending back policy handles to bigendian AS/U correctly. Jeremy. (This used to be commit 67e09aea47b73e5a72aae638a58b56f2ef67f8af) --- source3/rpc_server/srv_pipe_hnd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 3049c3adb9..ed1f9d36db 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -569,8 +569,14 @@ static ssize_t process_complete_pdu(pipes_struct *p) } prs_init( &rpc_in, 0, p->mem_ctx, UNMARSHALL); - /* Ensure we're using the corrent endianness. */ + + /* + * Ensure we're using the corrent endianness for both the + * RPC header flags and the raw data we will be reading from. + */ + prs_set_endian_data( &rpc_in, p->endian); + prs_set_endian_data( &p->in_data.data, p->endian); prs_give_memory( &rpc_in, data_p, (uint32)data_len, False); @@ -601,6 +607,9 @@ static ssize_t process_complete_pdu(pipes_struct *p) break; } + /* Reset to little endian. Probably don't need this but it won't hurt. */ + prs_set_endian_data( &p->in_data.data, RPC_LITTLE_ENDIAN); + if (!reply) { DEBUG(3,("process_complete_pdu: DCE/RPC fault sent on pipe %s\n", p->pipe_srv_name)); set_incoming_fault(p); -- cgit