summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-10-27 14:50:37 +0200
committerGünther Deschner <gd@samba.org>2011-10-27 16:40:15 +0200
commit790c6b4027011a1b03f388604edbb1cc5de27e18 (patch)
tree5f71a29eaa66061e5bafee6f228e11cf5d22dcac /source3
parentcdb7ef911831e215be185acaf7bf457b8a76b970 (diff)
downloadsamba-790c6b4027011a1b03f388604edbb1cc5de27e18.tar.gz
samba-790c6b4027011a1b03f388604edbb1cc5de27e18.tar.bz2
samba-790c6b4027011a1b03f388604edbb1cc5de27e18.zip
s3:rpc_client: remove references to auth_ntlmssp_state
metze Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Oct 27 16:40:15 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_pipe.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 694a74cad1..8ee14d6262 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1041,15 +1041,15 @@ static NTSTATUS create_ntlmssp_auth_rpc_bind_req(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
DATA_BLOB *auth_token)
{
- struct auth_ntlmssp_state *ntlmssp_ctx;
+ struct gensec_security *gensec_security;
DATA_BLOB null_blob = data_blob_null;
NTSTATUS status;
- ntlmssp_ctx = talloc_get_type_abort(cli->auth->auth_ctx,
- struct auth_ntlmssp_state);
+ gensec_security = talloc_get_type_abort(cli->auth->auth_ctx,
+ struct gensec_security);
DEBUG(5, ("create_ntlmssp_auth_rpc_bind_req: Processing NTLMSSP Negotiate\n"));
- status = gensec_update(ntlmssp_ctx->gensec_security, mem_ctx, NULL, null_blob, auth_token);
+ status = gensec_update(gensec_security, mem_ctx, NULL, null_blob, auth_token);
if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
data_blob_free(auth_token);
@@ -1691,7 +1691,7 @@ static void rpc_pipe_bind_step_one_done(struct tevent_req *subreq)
struct rpc_pipe_bind_state *state = tevent_req_data(
req, struct rpc_pipe_bind_state);
struct pipe_auth_data *pauth = state->cli->auth;
- struct auth_ntlmssp_state *ntlmssp_ctx;
+ struct gensec_security *gensec_security;
struct spnego_context *spnego_ctx;
struct gse_context *gse_ctx;
struct ncacn_packet *pkt = NULL;
@@ -1772,9 +1772,9 @@ static void rpc_pipe_bind_step_one_done(struct tevent_req *subreq)
return;
case DCERPC_AUTH_TYPE_NTLMSSP:
- ntlmssp_ctx = talloc_get_type_abort(pauth->auth_ctx,
- struct auth_ntlmssp_state);
- status = gensec_update(ntlmssp_ctx->gensec_security, state, NULL,
+ gensec_security = talloc_get_type_abort(pauth->auth_ctx,
+ struct gensec_security);
+ status = gensec_update(gensec_security, state, NULL,
auth.credentials, &auth_token);
if (NT_STATUS_EQUAL(status,
NT_STATUS_MORE_PROCESSING_REQUIRED)) {
@@ -2316,7 +2316,8 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
goto fail;
}
- result->auth_ctx = ntlmssp_ctx;
+ result->auth_ctx = talloc_move(result, &ntlmssp_ctx->gensec_security);
+ talloc_free(ntlmssp_ctx);
*presult = result;
return NT_STATUS_OK;
@@ -3204,7 +3205,7 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct pipe_auth_data *a;
struct schannel_state *schannel_auth;
- struct auth_ntlmssp_state *ntlmssp_ctx;
+ struct gensec_security *gensec_security;
struct spnego_context *spnego_ctx;
struct gse_context *gse_ctx;
DATA_BLOB sk = data_blob_null;
@@ -3234,9 +3235,9 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
make_dup = false;
break;
case DCERPC_AUTH_TYPE_NTLMSSP:
- ntlmssp_ctx = talloc_get_type_abort(a->auth_ctx,
- struct auth_ntlmssp_state);
- status = gensec_session_key(ntlmssp_ctx->gensec_security, mem_ctx, &sk);
+ gensec_security = talloc_get_type_abort(a->auth_ctx,
+ struct gensec_security);
+ status = gensec_session_key(gensec_security, mem_ctx, &sk);
if (!NT_STATUS_IS_OK(status)) {
return status;
}