aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--imap.c2
-rw-r--r--pop3.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/imap.c b/imap.c
index f13ebc84..9b7d9404 100644
--- a/imap.c
+++ b/imap.c
@@ -330,7 +330,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)
if ((ctl->server.authenticate == A_ANY
|| ctl->server.authenticate==A_OTP)
&& strstr(capabilities, "AUTH=X-OTP"))
- return(do_otp(sock, ctl));
+ return(do_otp(sock, "AUTHENTICATE", ctl));
#else
if (ctl->server.authenticate==A_NTLM)
{
diff --git a/pop3.c b/pop3.c
index a6224249..304bec8f 100644
--- a/pop3.c
+++ b/pop3.c
@@ -195,7 +195,7 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
#endif /* defined(KERBEROS_V4) || defined(KERBEROS_V5) */
flag has_cram = FALSE;
#ifdef OPIE_ENABLE
- flag has_opie = FALSE;
+ flag has_otp = FALSE;
#endif /* OPIE_ENABLE */
char buffer[64];
@@ -227,7 +227,7 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
if (has_cram)
ctl->server.authenticate = A_CRAM_MD5;
#ifdef OPIE_ENABLE
- if (has_opie)
+ if (has_otp)
ctl->server.authenticate = A_OTP;
#endif /* OPIE_ENABLE */
#if defined(GSSAPI)
@@ -250,7 +250,7 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
*/
if (
#if INET6_ENABLE
- strcmp(ctl->server.service, KPOP_PORT)!=0
+ ctl->server.service && (strcmp(ctl->server.service, KPOP_PORT)!=0)
#else /* INET6_ENABLE */
ctl->server.port != KPOP_PORT
#endif /* INET6_ENABLE */
@@ -265,7 +265,7 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
#endif /* defined(GSSAPI) */
#ifdef OPIE_ENABLE
if (ctl->server.authenticate == A_OTP)
- do_otp(sock, "AUTH", ctl)
+ do_otp(sock, "AUTH", ctl);
#endif /* OPIE_ENABLE */
if (ctl->server.authenticate == A_CRAM_MD5)
return(do_cram_md5(sock, "AUTH", ctl));