diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp.c | 27 | ||||
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp.h | 2 |
2 files changed, 20 insertions, 9 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.c b/source4/auth/ntlmssp/ntlmssp.c index f52d02dceb..dd3ba6e2e9 100644 --- a/source4/auth/ntlmssp/ntlmssp.c +++ b/source4/auth/ntlmssp/ntlmssp.c @@ -380,18 +380,29 @@ static bool gensec_ntlmssp_have_feature(struct gensec_security *gensec_security, NTSTATUS gensec_ntlmssp_start(struct gensec_security *gensec_security) { - struct gensec_ntlmssp_state *gensec_ntlmssp_state; - - gensec_ntlmssp_state = talloc_zero(gensec_security, struct gensec_ntlmssp_state); - if (!gensec_ntlmssp_state) { + struct gensec_ntlmssp_context *gensec_ntlmssp; + struct gensec_ntlmssp_state *ntlmssp_state; + + gensec_ntlmssp = talloc_zero(gensec_security, + struct gensec_ntlmssp_context); + if (!gensec_ntlmssp) { return NT_STATUS_NO_MEMORY; } - gensec_ntlmssp_state->gensec_security = gensec_security; - gensec_ntlmssp_state->auth_context = NULL; - gensec_ntlmssp_state->server_info = NULL; + gensec_ntlmssp->gensec_security = gensec_security; + + ntlmssp_state = talloc_zero(gensec_ntlmssp, + struct gensec_ntlmssp_state); + if (!ntlmssp_state) { + return NT_STATUS_NO_MEMORY; + } + + ntlmssp_state->gensec_security = gensec_security; + ntlmssp_state->callback_private = gensec_ntlmssp; + + gensec_ntlmssp->ntlmssp_state = ntlmssp_state; - gensec_security->private_data = gensec_ntlmssp_state; + gensec_security->private_data = ntlmssp_state; return NT_STATUS_OK; } diff --git a/source4/auth/ntlmssp/ntlmssp.h b/source4/auth/ntlmssp/ntlmssp.h index 31a0bc39bd..2d8ec2db43 100644 --- a/source4/auth/ntlmssp/ntlmssp.h +++ b/source4/auth/ntlmssp/ntlmssp.h @@ -156,7 +156,7 @@ struct gensec_ntlmssp_state struct gensec_ntlmssp_context { struct gensec_security *gensec_security; - struct ntlmssp_state *ntlmssp_state; + struct gensec_ntlmssp_state *ntlmssp_state; struct auth_context *auth_context; struct auth_serversupplied_info *server_info; }; |