From a0522a5b2633b644fb16d9bdfc6f07e1bed30a15 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 30 Dec 2009 08:06:28 +0100 Subject: s4:ntlmssp: remove gensec_security from (gensec_)ntlmssp_state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inspired by the NTLMSSP merge work by Andrew Bartlett. metze Signed-off-by: Günther Deschner --- source4/auth/ntlmssp/ntlmssp.c | 6 ++++-- source4/auth/ntlmssp/ntlmssp.h | 2 -- source4/auth/ntlmssp/ntlmssp_server.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/auth') diff --git a/source4/auth/ntlmssp/ntlmssp.c b/source4/auth/ntlmssp/ntlmssp.c index dd3ba6e2e9..e0a109b8d4 100644 --- a/source4/auth/ntlmssp/ntlmssp.c +++ b/source4/auth/ntlmssp/ntlmssp.c @@ -122,7 +122,10 @@ static NTSTATUS gensec_ntlmssp_magic(struct gensec_security *gensec_security, static NTSTATUS gensec_ntlmssp_update_find(struct gensec_ntlmssp_state *gensec_ntlmssp_state, const DATA_BLOB input, uint32_t *idx) { - struct gensec_security *gensec_security = gensec_ntlmssp_state->gensec_security; + struct gensec_ntlmssp_context *gensec_ntlmssp = + talloc_get_type_abort(gensec_ntlmssp_state->callback_private, + struct gensec_ntlmssp_context); + struct gensec_security *gensec_security = gensec_ntlmssp->gensec_security; uint32_t ntlmssp_command; uint32_t i; @@ -397,7 +400,6 @@ NTSTATUS gensec_ntlmssp_start(struct gensec_security *gensec_security) return NT_STATUS_NO_MEMORY; } - ntlmssp_state->gensec_security = gensec_security; ntlmssp_state->callback_private = gensec_ntlmssp; gensec_ntlmssp->ntlmssp_state = ntlmssp_state; diff --git a/source4/auth/ntlmssp/ntlmssp.h b/source4/auth/ntlmssp/ntlmssp.h index ddb2632927..ecb3908287 100644 --- a/source4/auth/ntlmssp/ntlmssp.h +++ b/source4/auth/ntlmssp/ntlmssp.h @@ -42,8 +42,6 @@ enum ntlmssp_message_type struct gensec_ntlmssp_state { - struct gensec_security *gensec_security; - enum ntlmssp_role role; enum samr_Role server_role; uint32_t expected_state; diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c index 120ce3271c..f19208054f 100644 --- a/source4/auth/ntlmssp/ntlmssp_server.c +++ b/source4/auth/ntlmssp/ntlmssp_server.c @@ -678,7 +678,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct gensec_ntlmssp_state *gensec_ user_info->client.account_name = gensec_ntlmssp_state->user; user_info->client.domain_name = gensec_ntlmssp_state->domain; user_info->workstation_name = gensec_ntlmssp_state->workstation; - user_info->remote_host = gensec_get_remote_address(gensec_ntlmssp_state->gensec_security); + user_info->remote_host = gensec_get_remote_address(gensec_ntlmssp->gensec_security); user_info->password_state = AUTH_PASSWORD_RESPONSE; user_info->password.response.lanman = gensec_ntlmssp_state->lm_resp; -- cgit