mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
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>
This commit is contained in:
parent
1231b784a1
commit
643d05826c
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user