aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--driver.c25
-rw-r--r--kerberos.c22
-rw-r--r--pop3.c6
3 files changed, 9 insertions, 44 deletions
diff --git a/driver.c b/driver.c
index a1535b92..4038b484 100644
--- a/driver.c
+++ b/driver.c
@@ -40,33 +40,12 @@
#include "mx.h"
#endif /* HAVE_RES_SEARCH */
+#include "kerberos.h"
#ifdef KERBEROS_V4
-#ifdef KERBEROS_V5
-#include <kerberosIV/des.h>
-#include <kerberosIV/krb.h>
-#else
-#if defined (__bsdi__)
-#include <des.h> /* order of includes matters */
-#include <krb.h>
-#define krb_get_err_text(e) (krb_err_txt[e])
-#else
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__)
-#define krb_get_err_text(e) (krb_err_txt[e])
-#include <krb.h>
-#include <des.h>
-#else
-#include <krb.h>
-#include <des.h>
-#endif /* ! defined (__FreeBSD__) */
-#endif /* ! defined (__bsdi__) */
-#endif /* KERBEROS_V5 */
#include <netinet/in.h>
#include <netdb.h>
#endif /* KERBEROS_V4 */
-#ifdef KERBEROS_V5
-#include <krb5.h>
-#include <com_err.h>
-#endif /* KERBEROS_V5 */
+
#include "i18n.h"
#include "socket.h"
diff --git a/kerberos.c b/kerberos.c
index 696d3af1..64abd207 100644
--- a/kerberos.c
+++ b/kerberos.c
@@ -4,6 +4,9 @@
* For license terms, see the file COPYING in this directory.
*/
#include "config.h"
+
+#ifdef KERBEROS_V4
+
#include <stdio.h>
#include <string.h>
#include <ctype.h>
@@ -12,28 +15,11 @@
#endif
#include "fetchmail.h"
#include "socket.h"
+#include "kerberos.h"
#include <sys/types.h>
#include <netinet/in.h> /* for htonl/ntohl */
-#ifdef KERBEROS_V4
-
-# ifdef KERBEROS_V5
-# include <kerberosIV/des.h>
-# include <kerberosIV/krb.h>
-# else
-# if defined (__bsdi__)
-# include <des.h>
-# define krb_get_err_text(e) (krb_err_txt[e])
-# endif
-# if defined(__NetBSD__) || (__FreeBSD__) || defined(__linux__)
-# define krb_get_err_text(e) (krb_err_txt[e])
-# endif
-# include <krb.h>
-# endif
-
-/* des.h might define _ for no good reason. */
-#undef _
#include "i18n.h"
#if SIZEOF_INT == 4
diff --git a/pop3.c b/pop3.c
index 0ff1cd45..93c2516b 100644
--- a/pop3.c
+++ b/pop3.c
@@ -211,10 +211,10 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
if (strstr(buffer, "GSSAPI"))
has_gssapi = TRUE;
#endif /* defined(GSSAPI) */
-#if defined(KERBEROS_V4) || defined(KERBEROS_V5)
+#if defined(KERBEROS_V4)
if (strstr(buffer, "KERBEROS_V4"))
has_kerberos = TRUE;
-#endif /* defined(KERBEROS_V4) || defined(KERBEROS_V5) */
+#endif /* defined(KERBEROS_V4) */
#ifdef OPIE_ENABLE
if (strstr(buffer, "X-OTP"))
has_otp = TRUE;
@@ -227,7 +227,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
/*
* OK, we have an authentication type now.
*/
-#if defined(KERBEROS_V4) || defined(KERBEROS_V5)
+#if defined(KERBEROS_V4)
/*
* Servers doing KPOP have to go through a dummy login sequence
* rather than doing SASL.