fetchmail-friends
[Top] [All Lists]

[fetchmail]Attempted fix for KPOP breakage

2001-03-03 14:31:51
Matthew Gabeler-Lee and Zack Weinberg seem to have both tripped over a
bug in KPOP support that I introduced while rewriting the
authentication system.  It seems that KPOP servers don't do SASL but
instead need to see a dummy PASS command.  This has been reported as
Debian bug #88288.

This patch against the 5.7.0 sources should fix the problem.  Please
let me know...

--- pop3.c      2001/02/20 05:15:42     1.191
+++ pop3.c      2001/03/03 21:25:33
@@ -244,8 +244,18 @@
         * OK, we have an authentication type now.
         */
 #if defined(KERBEROS_V4) || defined(KERBEROS_V5)
-       if (ctl->server.authenticate == A_KERBEROS_V4
-               || ctl->server.authenticate == A_KERBEROS_V5)
+       /* 
+        * Servers doing KPOP have to go through a dummy login sequence
+        * rather than doing SASL.
+        */
+       if (
+#if INET6_ENABLE
+           strcmp(ctl->server.service, KPOP_PORT)!=0
+#else /* INET6_ENABLE */
+           ctl->server.port != KPOP_PORT
+#endif /* INET6_ENABLE */
+           && (ctl->server.authenticate == A_KERBEROS_V4
+            || ctl->server.authenticate == A_KERBEROS_V5))
            return(do_rfc1731(sock, "AUTH", ctl->server.truename));
 #endif /* defined(KERBEROS_V4) || defined(KERBEROS_V5) */
 #if defined(GSSAPI)
-- 
                <a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>

A wise and frugal government, which shall restrain men from injuring
one another, which shall leave them otherwise free to regulate their
own pursuits of industry and improvement, and shall not take from the
mouth of labor the bread it has earned. This is the sum of good
government, and all that is necessary to close the circle of our
felicities.
        -- Thomas Jefferson, in his 1801 inaugural address


<Prev in Thread] Current Thread [Next in Thread>