From d92b21280edba86b69d3da38bc87d0390c0a3e7f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 16 Jan 2003 03:29:54 +0000 Subject: Updates to the NTLMSSP code again - moving the base64 decode fuctionality out of the SWAT code, and adding a base64 encoder. The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for use with Squid. Unfortunetly the squid side doesn't quite support what we need yet. Changes to winbind to get us the info we need, and a couple of consequential changes/cleanups in the rest of the code. Andrew Bartlett (This used to be commit fe50ca8f54ded2e119bde08831785fbe0db2ee99) --- source3/auth/auth_ntlmssp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/auth') diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c index ab594c19e3..3e650a7a2a 100644 --- a/source3/auth/auth_ntlmssp.c +++ b/source3/auth/auth_ntlmssp.c @@ -23,15 +23,15 @@ #include "includes.h" -static const uint8 *auth_ntlmssp_get_challenge(void *cookie) +static const uint8 *auth_ntlmssp_get_challenge(struct ntlmssp_state *ntlmssp_state) { - AUTH_NTLMSSP_STATE *auth_ntlmssp_state = cookie; + AUTH_NTLMSSP_STATE *auth_ntlmssp_state = ntlmssp_state->auth_context; return auth_ntlmssp_state->auth_context->get_ntlm_challenge(auth_ntlmssp_state->auth_context); } -static NTSTATUS auth_ntlmssp_check_password(void *cookie) +static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state) { - AUTH_NTLMSSP_STATE *auth_ntlmssp_state = cookie; + AUTH_NTLMSSP_STATE *auth_ntlmssp_state = ntlmssp_state->auth_context; uint32 auth_flags = AUTH_FLAG_NONE; auth_usersupplied_info *user_info = NULL; DATA_BLOB plaintext_password = data_blob(NULL, 0); @@ -107,6 +107,7 @@ NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state) (*auth_ntlmssp_state)->ntlmssp_state->auth_context = (*auth_ntlmssp_state); (*auth_ntlmssp_state)->ntlmssp_state->get_challenge = auth_ntlmssp_get_challenge; (*auth_ntlmssp_state)->ntlmssp_state->check_password = auth_ntlmssp_check_password; + (*auth_ntlmssp_state)->ntlmssp_state->server_role = lp_server_role(); return NT_STATUS_OK; } -- cgit