aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-05-12 12:38:05 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-05-12 12:38:05 +0000
commitdbf4266b849395808cd77ec2f12d2aa471854533 (patch)
tree1a64e48523c6a3f85c27f2589c8b327596ebc2cb
parent394b5392352b68b170e1ca37be6b5efadf256d07 (diff)
downloadfetchmail-dbf4266b849395808cd77ec2f12d2aa471854533.tar.gz
fetchmail-dbf4266b849395808cd77ec2f12d2aa471854533.tar.bz2
fetchmail-dbf4266b849395808cd77ec2f12d2aa471854533.zip
When using NTLM authentication, use regular IMAP response code handler after
completing NTLM handshake, for robustness and consistency. Taken from the NetBSD portable packages collection, patch-ac. svn path=/branches/BRANCH_6-3/; revision=4825
-rw-r--r--NEWS3
-rw-r--r--imap.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 518dd940..ada7d23e 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,9 @@ fetchmail 6.3.5 (not yet released):
input buffer when the message has been completely read, to avoid taking
trailing garbage into the message if the terminal CRLF is missing. Fixes
Debian Bug#312415. (Patch suggested by Mike Jones, Manchester Univ.).
+* When using NTLM authentication, use regular IMAP response code handler after
+ completing NTLM handshake, for robustness and consistency.
+ (Taken from the NetBSD portable packages collection, patch-ac.)
# TRANSLATION UPDATES:
* Russian/ru (Pavel Maryanov), Vietnamese/vi (Clytie Siddall)
diff --git a/imap.c b/imap.c
index 856f3f86..3e3599f9 100644
--- a/imap.c
+++ b/imap.c
@@ -263,10 +263,8 @@ static int do_imap_ntlm(int sock, struct query *ctl)
strcat(msgbuf,"\r\n");
SockWrite (sock, msgbuf, strlen (msgbuf));
- if ((result = gen_recv (sock, msgbuf, sizeof msgbuf)))
- return result;
-
- if (strstr (msgbuf, "OK"))
+ result = imap_ok (sock, NULL);
+ if (result == PS_SUCCESS)
return PS_SUCCESS;
else
return PS_AUTHFAIL;