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/smbd/sesssetup.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 939cdf2a91..9dc9bee041 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -361,14 +361,12 @@ static int reply_spnego_negotiate(connection_struct *conn, reply_spnego_ntlmssp_ok(conn, outbuf, global_ntlmssp_state); auth_ntlmssp_end(&global_ntlmssp_state); - data_blob_free(&chal); /* and tell smbd that we have already replied to this packet */ return -1; } auth_ntlmssp_end(&global_ntlmssp_state); - data_blob_free(&chal); return ERROR_NT(nt_status_squash(nt_status)); } @@ -392,15 +390,15 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf, } nt_status = auth_ntlmssp_update(global_ntlmssp_state, - auth, &auth_reply); + auth, &auth_reply); data_blob_free(&auth); - data_blob_free(&auth_reply); if (NT_STATUS_IS_OK(nt_status)) { reply_spnego_ntlmssp_ok(conn, outbuf, global_ntlmssp_state); auth_ntlmssp_end(&global_ntlmssp_state); + data_blob_free(&auth_reply); } else { /* !NT_STATUS_IS_OK(nt_status) */ auth_ntlmssp_end(&global_ntlmssp_state); @@ -450,7 +448,8 @@ static int reply_spnego_anonymous(connection_struct *conn, char *inbuf, char *ou /**************************************************************************** reply to a session setup command ****************************************************************************/ -static int reply_sesssetup_and_X_spnego(connection_struct *conn, char *inbuf,char *outbuf, +static int reply_sesssetup_and_X_spnego(connection_struct *conn, char *inbuf, + char *outbuf, int length,int bufsize) { uint8 *p; -- cgit