From 6555307aa11741171258541da2c13ce25d9e3f55 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 12 Jul 2010 16:27:22 -0400 Subject: [PATCH] s3-dceprc: Fix auth_length in auth3 response MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/rpc_client/cli_pipe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index aea6b36e4a1..f4e42cc6a14 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2715,7 +2715,6 @@ static NTSTATUS create_rpc_bind_auth3(struct rpc_pipe_client *cli, DATA_BLOB *pauth_blob, prs_struct *rpc_out) { - uint16_t auth_len = pauth_blob->length; uint16_t frag_len = 0; NTSTATUS status; union dcerpc_payload u; @@ -2735,14 +2734,14 @@ static NTSTATUS create_rpc_bind_auth3(struct rpc_pipe_client *cli, } /* Start building the frag length. */ - frag_len = RPC_HEADER_LEN + 4 /* pad */ + RPC_HDR_AUTH_LEN + auth_len; + frag_len = RPC_HEADER_LEN + 4 /* pad */ + RPC_HDR_AUTH_LEN + pauth_blob->length; status = dcerpc_push_ncacn_packet(prs_get_mem_context(rpc_out), DCERPC_PKT_AUTH3, DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST, frag_len, - auth_len ? auth_len - RPC_HDR_AUTH_LEN : 0, + pauth_blob->length, rpc_call_id, u, &blob);