projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drop gss as well.
[apps/madmutt.git]
/
imap
/
auth.c
diff --git
a/imap/auth.c
b/imap/auth.c
index
f5af43f
..
8b32807
100644
(file)
--- a/
imap/auth.c
+++ b/
imap/auth.c
@@
-11,34
+11,16
@@
/* IMAP login/authentication code */
/* IMAP login/authentication code */
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "lib/mem.h"
-#include "lib/intl.h"
-#include "lib/debug.h"
+#include <lib-lib/lib-lib.h>
#include "mutt.h"
#include "imap_private.h"
#include "auth.h"
static imap_auth_t imap_authenticators[] = {
#include "mutt.h"
#include "imap_private.h"
#include "auth.h"
static imap_auth_t imap_authenticators[] = {
-#ifdef USE_SASL
{imap_auth_sasl, NULL},
{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"},
{imap_auth_login, "login"},
-
- {NULL}
+ {NULL, NULL}
};
/* imap_authenticate: Attempt to authenticate using either user-specified
};
/* imap_authenticate: Attempt to authenticate using either user-specified
@@
-53,7
+35,7
@@
int imap_authenticate (IMAP_DATA * idata)
if (ImapAuthenticators && *ImapAuthenticators) {
/* Try user-specified list of authentication methods */
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, ':');
for (method = methods; method; method = delim) {
delim = strchr (method, ':');
@@
-62,7
+44,6
@@
int imap_authenticate (IMAP_DATA * idata)
if (!method[0])
continue;
if (!method[0])
continue;
- debug_print (2, ("Trying method %s\n", method));
authenticator = imap_authenticators;
while (authenticator->authenticate) {
authenticator = imap_authenticators;
while (authenticator->authenticate) {
@@
-70,7
+51,7
@@
int imap_authenticate (IMAP_DATA * idata)
!ascii_strcasecmp (authenticator->method, method))
if ((r = authenticator->authenticate (idata, method)) !=
IMAP_AUTH_UNAVAIL) {
!ascii_strcasecmp (authenticator->method, method))
if ((r = authenticator->authenticate (idata, method)) !=
IMAP_AUTH_UNAVAIL) {
-
FREE
(&methods);
+
p_delete
(&methods);
return r;
}
return r;
}
@@
-78,11
+59,10
@@
int imap_authenticate (IMAP_DATA * idata)
}
}
}
}
-
FREE
(&methods);
+
p_delete
(&methods);
}
else {
/* Fall back to default: any authenticator */
}
else {
/* Fall back to default: any authenticator */
- debug_print (2, ("Using any available method.\n"));
authenticator = imap_authenticators;
while (authenticator->authenticate) {
authenticator = imap_authenticators;
while (authenticator->authenticate) {