drop gss as well.
[apps/madmutt.git] / imap / auth.c
index 2e6b8ca..8b32807 100644 (file)
 
 /* IMAP login/authentication code */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <lib-lib/mem.h>
-
-#include <lib-lib/macros.h>
-#include "lib/debug.h"
+#include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
-#include "ascii.h"
 #include "imap_private.h"
 #include "auth.h"
 
 static imap_auth_t imap_authenticators[] = {
-#ifdef USE_SASL
   {imap_auth_sasl, NULL},
-#else
-  {imap_auth_anon, "anonymous"},
-#endif
-#ifdef USE_GSS
-  {imap_auth_gss, "gssapi"},
-#endif
-  /* SASL includes CRAM-MD5 (and GSSAPI, but that's not enabled by default) */
-#ifndef USE_SASL
-  {imap_auth_cram_md5, "cram-md5"},
-#endif
   {imap_auth_login, "login"},
-
   {NULL, NULL}
 };
 
@@ -55,7 +35,7 @@ int imap_authenticate (IMAP_DATA * idata)
 
   if (ImapAuthenticators && *ImapAuthenticators) {
     /* Try user-specified list of authentication methods */
-    methods = str_dup (ImapAuthenticators);
+    methods = m_strdup(ImapAuthenticators);
 
     for (method = methods; method; method = delim) {
       delim = strchr (method, ':');
@@ -64,7 +44,6 @@ int imap_authenticate (IMAP_DATA * idata)
       if (!method[0])
         continue;
 
-      debug_print (2, ("Trying method %s\n", method));
       authenticator = imap_authenticators;
 
       while (authenticator->authenticate) {
@@ -84,7 +63,6 @@ int imap_authenticate (IMAP_DATA * idata)
   }
   else {
     /* Fall back to default: any authenticator */
-    debug_print (2, ("Using any available method.\n"));
     authenticator = imap_authenticators;
 
     while (authenticator->authenticate) {