From 0c16aeecaf389c8d7e11aaa82469ab645e7912e5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 28 Sep 1997 16:40:38 +0000 Subject: Greg Stark's first round of patches. svn path=/trunk/; revision=1428 --- NEWS | 3 +++ driver.c | 2 +- pop3.c | 8 ++++++-- report.c | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index b17bb37a..518c02d5 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,9 @@ ------------------------------------------------------------------------------ fetchmail-4.2.8 () * Fixed a bug in POP2 compilation introduced sometime after 4.0.8. +* Only emit length-mismatch messages in verbose mode. +* POP3 lock busy error is now treated as authorization failure (Greg Stark) +* Kerberos error is now treated as authorization failure (Greg Stark) There are 284 people on the fetchmail-friends list. diff --git a/driver.c b/driver.c index 2af9b482..ea6489ee 100644 --- a/driver.c +++ b/driver.c @@ -1289,7 +1289,7 @@ const char *canonical; /* server name */ if (rem != KSUCCESS) { error(0, -1, "kerberos error %s", (krb_get_err_text (rem))); - return (PS_ERROR); + return (PS_AUTHFAIL); } return (0); } diff --git a/pop3.c b/pop3.c index 254aa6b0..2f1c2a65 100644 --- a/pop3.c +++ b/pop3.c @@ -52,7 +52,9 @@ int pop3_ok (int sock, char *argbuf) while (isalpha(*bufp)) bufp++; - *(bufp++) = '\0'; + + if (*bufp) + *(bufp++) = '\0'; if (strcmp(buf,"+OK") == 0) { @@ -76,7 +78,9 @@ int pop3_ok (int sock, char *argbuf) if (strstr(bufp,"lock")||strstr(bufp,"Lock")||strstr(bufp,"LOCK")) ok = PS_LOCKBUSY; else - ok = PS_ERROR; + ok = PS_AUTHFAIL; + if (*bufp) + error(0,0,bufp); } else ok = PS_PROTOCOL; diff --git a/report.c b/report.c index bcca5f64..a4032782 100644 --- a/report.c +++ b/report.c @@ -224,7 +224,7 @@ error (status, errnum, message, va_alist) fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); #endif - if (errnum) { + if (errnum && errnum != -1) { char *tmps = strerror(errnum); if (tmps) { fprintf (stderr, ": %s", tmps); -- cgit v1.2.3