summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-08 14:00:54 -0400
committerSimo Sorce <idra@samba.org>2010-07-08 18:38:55 -0400
commitc609e84170486f183ad0a7a13c87c3b7c7bc490d (patch)
tree97d86accb4ff6cca0e85faf1dcffb8fccc772dc7
parent91cb2aed54cb7fe1f5e5c6359b0ef505f689b172 (diff)
downloadsamba-c609e84170486f183ad0a7a13c87c3b7c7bc490d.tar.gz
samba-c609e84170486f183ad0a7a13c87c3b7c7bc490d.tar.bz2
samba-c609e84170486f183ad0a7a13c87c3b7c7bc490d.zip
s3-dcerpc: use dcerpc_pull_dcerpc_auth() in cli_pipe_verify_schannel()
-rw-r--r--source3/rpc_client/cli_pipe.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 49df252230..bff3f43e59 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -930,7 +930,7 @@ static NTSTATUS cli_pipe_verify_schannel(struct rpc_pipe_client *cli,
prs_struct *current_pdu,
uint8 *p_ss_padding_len)
{
- RPC_HDR_AUTH auth_info;
+ struct dcerpc_auth auth_info;
uint32_t auth_len = prhdr->auth_length;
uint32 save_offset = prs_offset(current_pdu);
struct schannel_state *schannel_auth =
@@ -976,17 +976,23 @@ static NTSTATUS cli_pipe_verify_schannel(struct rpc_pipe_client *cli,
return NT_STATUS_BUFFER_TOO_SMALL;
}
- if(!smb_io_rpc_hdr_auth("hdr_auth", &auth_info, current_pdu, 0)) {
- DEBUG(0,("cli_pipe_verify_schannel: failed to unmarshall RPC_HDR_AUTH.\n"));
- return NT_STATUS_BUFFER_TOO_SMALL;
+ blob = data_blob_const(prs_data_p(current_pdu)
+ + prs_offset(current_pdu),
+ prs_data_size(current_pdu)
+ - prs_offset(current_pdu));
+
+ status = dcerpc_pull_dcerpc_auth(cli, &blob, &auth_info);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("cli_pipe_verify_ntlmssp: failed to unmarshall dcerpc_auth.\n"));
+ return status;
}
/* Ensure auth_pad_len fits into the packet. */
- if (RPC_HEADER_LEN + RPC_HDR_REQ_LEN + auth_info.auth_pad_len +
+ if (RPC_HEADER_LEN + RPC_HDR_REQ_LEN + auth_info.auth_pad_length +
RPC_HDR_AUTH_LEN + auth_len > prhdr->frag_length) {
DEBUG(0,("cli_pipe_verify_schannel: auth_info.auth_pad_len "
"too large (%u), auth_len (%u), frag_len = (%u).\n",
- (unsigned int)auth_info.auth_pad_len,
+ (unsigned int)auth_info.auth_pad_length,
(unsigned int)auth_len,
(unsigned int)prhdr->frag_length));
return NT_STATUS_BUFFER_TOO_SMALL;
@@ -1051,7 +1057,7 @@ static NTSTATUS cli_pipe_verify_schannel(struct rpc_pipe_client *cli,
* stream once the sign/seal is done.
*/
- *p_ss_padding_len = auth_info.auth_pad_len;
+ *p_ss_padding_len = auth_info.auth_pad_length;
return NT_STATUS_OK;
}