diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-12-24 10:02:57 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-12-24 10:02:57 +0000 |
commit | aeb9021852325ef9faf3b1160ce55afa35a90513 (patch) | |
tree | b41772d7facbedf41274a1d07dfcaa8ecfc35bf6 /source3/utils/ntlm_auth.c | |
parent | cd852878298e2d786f420b68f44eb5ca91e7db42 (diff) | |
download | samba-aeb9021852325ef9faf3b1160ce55afa35a90513.tar.gz samba-aeb9021852325ef9faf3b1160ce55afa35a90513.tar.bz2 samba-aeb9021852325ef9faf3b1160ce55afa35a90513.zip |
(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)
Diffstat (limited to 'source3/utils/ntlm_auth.c')
-rw-r--r-- | source3/utils/ntlm_auth.c | 13 |
1 files changed, 9 insertions, 4 deletions
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; |