aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-27 17:59:44 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-27 17:59:44 +0000
commit487e3eec5bbdd70ca5078186d35f4deac924bc4c (patch)
tree852b59f72289dceed9d67969ea3d29fe343107ed /imap.c
parent59ba66d551d23c4efd4360a7c1f7a53ee2793a4e (diff)
downloadfetchmail-487e3eec5bbdd70ca5078186d35f4deac924bc4c.tar.gz
fetchmail-487e3eec5bbdd70ca5078186d35f4deac924bc4c.tar.bz2
fetchmail-487e3eec5bbdd70ca5078186d35f4deac924bc4c.zip
We can specify NTLM as an authentication type.
svn path=/trunk/; revision=3160
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/imap.c b/imap.c
index 08ca65c5..b287ca75 100644
--- a/imap.c
+++ b/imap.c
@@ -316,7 +316,9 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
* in a challenge-response.
*/
- if (strstr(capabilities, "AUTH=CRAM-MD5"))
+ if ((ctl->server.authenticate == A_ANY
+ || ctl->server.authenticate==A_CRAM_MD5)
+ && strstr(capabilities, "AUTH=CRAM-MD5"))
{
if ((ok = do_cram_md5 (sock, "AUTHENTICATE", ctl)))
/* SASL cancellation of authentication */
@@ -325,13 +327,17 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
}
#if OPIE_ENABLE
- if (strstr(capabilities, "AUTH=X-OTP"))
+ if ((ctl->server.authenticate == A_ANY
+ || ctl->server.authenticate==A_OTP)
+ && strstr(capabilities, "AUTH=X-OTP"))
return(do_otp(sock, ctl);
#endif /* OPIE_ENABLE */
#ifdef NTLM_ENABLE
- if (strstr (capabilities, "AUTH=NTLM"))
- return(do_imap_ntlm (sock, ctl));
+ if ((ctl->server.authenticate == A_ANY
+ || ctl->server.authenticate==A_NTLM)
+ && strstr (capabilities, "AUTH=NTLM"))
+ return(do_imap_ntlm(sock, ctl));
#endif /* NTLM_ENABLE */
#ifdef __UNUSED__ /* The Cyrus IMAP4rev1 server chokes on this */