summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-25 17:20:45 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-03 18:48:04 +1000
commit643d05826cbf7ef82e1ee8f33d610a79dcb8607a (patch)
treebafc57dff526d36804e179657c945c5acc84e02c
parent1231b784a1a30c475960d429465ca104c906801c (diff)
downloadsamba-643d05826cbf7ef82e1ee8f33d610a79dcb8607a.tar.gz
samba-643d05826cbf7ef82e1ee8f33d610a79dcb8607a.tar.bz2
samba-643d05826cbf7ef82e1ee8f33d610a79dcb8607a.zip
gensec: Don't keep a second copy of the auth4_context in gensec_ntlmssp_state
The auth4_context is already in the gensec_security structure, which is available by de-reference here anyway. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r--source4/auth/ntlmssp/ntlmssp.h1
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c10
2 files changed, 4 insertions, 7 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.h b/source4/auth/ntlmssp/ntlmssp.h
index 00439e68dd..1126cdfe05 100644
--- a/source4/auth/ntlmssp/ntlmssp.h
+++ b/source4/auth/ntlmssp/ntlmssp.h
@@ -26,7 +26,6 @@
struct gensec_ntlmssp_context {
struct gensec_security *gensec_security;
struct ntlmssp_state *ntlmssp_state;
- struct auth4_context *auth_context;
struct auth_user_info_dc *user_info_dc;
};
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index 477972d1d4..9f9e058f97 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -88,7 +88,7 @@ static NTSTATUS auth_ntlmssp_get_challenge(const struct ntlmssp_state *ntlmssp_s
struct gensec_ntlmssp_context *gensec_ntlmssp =
talloc_get_type_abort(ntlmssp_state->callback_private,
struct gensec_ntlmssp_context);
- struct auth4_context *auth_context = gensec_ntlmssp->auth_context;
+ struct auth4_context *auth_context = gensec_ntlmssp->gensec_security->auth_context;
NTSTATUS status;
status = auth_context->get_challenge(auth_context, chal);
@@ -111,7 +111,7 @@ static bool auth_ntlmssp_may_set_challenge(const struct ntlmssp_state *ntlmssp_s
struct gensec_ntlmssp_context *gensec_ntlmssp =
talloc_get_type_abort(ntlmssp_state->callback_private,
struct gensec_ntlmssp_context);
- struct auth4_context *auth_context = gensec_ntlmssp->auth_context;
+ struct auth4_context *auth_context = gensec_ntlmssp->gensec_security->auth_context;
return auth_context->challenge_may_be_modified(auth_context);
}
@@ -125,7 +125,7 @@ static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state,
struct gensec_ntlmssp_context *gensec_ntlmssp =
talloc_get_type_abort(ntlmssp_state->callback_private,
struct gensec_ntlmssp_context);
- struct auth4_context *auth_context = gensec_ntlmssp->auth_context;
+ struct auth4_context *auth_context = gensec_ntlmssp->gensec_security->auth_context;
NTSTATUS nt_status;
const uint8_t *chal;
@@ -155,7 +155,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
struct gensec_ntlmssp_context *gensec_ntlmssp =
talloc_get_type_abort(ntlmssp_state->callback_private,
struct gensec_ntlmssp_context);
- struct auth4_context *auth_context = gensec_ntlmssp->auth_context;
+ struct auth4_context *auth_context = gensec_ntlmssp->gensec_security->auth_context;
NTSTATUS nt_status;
struct auth_usersupplied_info *user_info;
@@ -289,8 +289,6 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SEAL;
}
- gensec_ntlmssp->auth_context = gensec_security->auth_context;
-
ntlmssp_state->get_challenge = auth_ntlmssp_get_challenge;
ntlmssp_state->may_set_challenge = auth_ntlmssp_may_set_challenge;
ntlmssp_state->set_challenge = auth_ntlmssp_set_challenge;