From aeb9021852325ef9faf3b1160ce55afa35a90513 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Dec 2003 10:02:57 +0000 Subject: (merge from 3.0) Thanks to Serassio Guido for noticing issues in our Squid NTLMSSP implementation. We were not resetting the NTLMSSP state for new negotiate packets. Andrew Bartlett (This used to be commit ada064af72e120aacd733245292e988dd696d059) --- source3/utils/ntlm_auth.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 5b1b83d032..132134fd9d 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -340,18 +340,23 @@ static void manage_squid_ntlmssp_request(enum stdio_helper_mode stdio_helper_mod return; } - if (strlen(buf) > 3) { - request = base64_decode_data_blob(buf + 3); - } else if (strcmp(buf, "YR") == 0) { - request = data_blob(NULL, 0); + if (strncmp(buf, "YR", 2) == 0) { if (ntlmssp_state) ntlmssp_end(&ntlmssp_state); + } else if (strncmp(buf, "KK", 2) == 0) { + } else { DEBUG(1, ("NTLMSSP query [%s] invalid", buf)); x_fprintf(x_stdout, "BH\n"); return; } + if (strlen(buf) > 3) { + request = base64_decode_data_blob(buf + 3); + } else { + request = data_blob(NULL, 0); + } + if (!ntlmssp_state) { ntlmssp_server_start(&ntlmssp_state); ntlmssp_state->check_password = winbind_pw_check; -- cgit