From e0dc5edc9eee1c0c15dde22b6cbebe6a46384732 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 22 Mar 2001 21:26:14 +0000 Subject: Nalin's GSSAPI post. svn path=/trunk/; revision=3271 --- imap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'imap.c') diff --git a/imap.c b/imap.c index be2fcd5b..915ed920 100644 --- a/imap.c +++ b/imap.c @@ -299,7 +299,10 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting) if ((ctl->server.authenticate == A_ANY || ctl->server.authenticate==A_GSSAPI) && strstr(capabilities, "AUTH=GSSAPI")) - return(do_gssauth(sock, "AUTHENTICATE", ctl->server.truename, ctl->remotename)); + if(!(ok = do_gssauth(sock, "AUTHENTICATE", ctl->server.truename, ctl->remotename))) + { + return ok; + } #endif /* GSSAPI */ #ifdef KERBEROS_V4 @@ -308,7 +311,7 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting) || ctl->server.authenticate==A_KERBEROS_V5) && strstr(capabilities, "AUTH=KERBEROS_V4")) { - if ((ok = do_rfc1731(sock, "AUTHENTICATE", ctl->server.truename))) + if (!(ok = do_rfc1731(sock, "AUTHENTICATE", ctl->server.truename))) /* SASL cancellation of authentication */ gen_send(sock, "*"); return(ok); -- cgit v1.2.3