summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-12-30 08:06:28 +0100
committerGünther Deschner <gd@samba.org>2010-03-24 17:34:50 +0100
commita0522a5b2633b644fb16d9bdfc6f07e1bed30a15 (patch)
treea055dd0ec6c94b6fd8c859859a60234e7e7ab844
parent32d822af813b74c33bc618b4130dc50a3b79c7af (diff)
downloadsamba-a0522a5b2633b644fb16d9bdfc6f07e1bed30a15.tar.gz
samba-a0522a5b2633b644fb16d9bdfc6f07e1bed30a15.tar.bz2
samba-a0522a5b2633b644fb16d9bdfc6f07e1bed30a15.zip
s4:ntlmssp: remove gensec_security from (gensec_)ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett. metze Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--source4/auth/ntlmssp/ntlmssp.c6
-rw-r--r--source4/auth/ntlmssp/ntlmssp.h2
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c2
3 files changed, 5 insertions, 5 deletions
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;