From 487e3eec5bbdd70ca5078186d35f4deac924bc4c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 27 Feb 2001 17:59:44 +0000 Subject: We can specify NTLM as an authentication type. svn path=/trunk/; revision=3160 --- imap.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'imap.c') 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 */ -- cgit v1.2.3