summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-13 10:27:37 -0400
committerGünther Deschner <gd@samba.org>2010-07-16 01:51:16 +0200
commitf0626d14f051c11cdb2356bd730342249feeb0a9 (patch)
tree049a99f7f314ea2aad7942a24288e30f627a295e
parent7d9c62c646d3bc72d19c2d188305680ce0cd8ad0 (diff)
downloadsamba-f0626d14f051c11cdb2356bd730342249feeb0a9.tar.gz
samba-f0626d14f051c11cdb2356bd730342249feeb0a9.tar.bz2
samba-f0626d14f051c11cdb2356bd730342249feeb0a9.zip
s3-dcerpc: Stop using hand marshalling in rpc_finish_auth3_bind_send()
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--source3/rpc_client/cli_pipe.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 391268ca34..f91e2e28b7 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2977,9 +2977,8 @@ static NTSTATUS rpc_finish_auth3_bind_send(struct tevent_req *req,
struct ncacn_packet *r,
prs_struct *reply_pdu)
{
- DATA_BLOB server_response = data_blob_null;
DATA_BLOB client_reply = data_blob_null;
- struct rpc_hdr_auth_info hdr_auth;
+ struct dcerpc_auth auth;
struct tevent_req *subreq;
NTSTATUS status;
@@ -2988,24 +2987,19 @@ static NTSTATUS rpc_finish_auth3_bind_send(struct tevent_req *req,
return NT_STATUS_INVALID_PARAMETER;
}
- if (!prs_set_offset(
- reply_pdu,
- r->frag_length - r->auth_length - RPC_HDR_AUTH_LEN)) {
- return NT_STATUS_INVALID_PARAMETER;
- }
-
- if (!smb_io_rpc_hdr_auth("hdr_auth", &hdr_auth, reply_pdu, 0)) {
- return NT_STATUS_INVALID_PARAMETER;
+ status = dcerpc_pull_dcerpc_auth(talloc_tos(),
+ &r->u.bind_ack.auth_info,
+ &auth);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("Failed to pull dcerpc auth: %s.\n",
+ nt_errstr(status)));
+ return status;
}
/* TODO - check auth_type/auth_level match. */
- server_response = data_blob_talloc(talloc_tos(), NULL, r->auth_length);
- prs_copy_data_out((char *)server_response.data, reply_pdu,
- r->auth_length);
-
status = ntlmssp_update(state->cli->auth->a_u.ntlmssp_state,
- server_response, &client_reply);
+ auth.credentials, &client_reply);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("rpc_finish_auth3_bind: NTLMSSP update using server "