aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-09-25 07:03:24 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-09-25 07:03:24 +0000
commit18df438fd8963e044440378d1d91e8b18066d4ea (patch)
tree257bc716dcea37ee16c3d37f2f3f3ec2ae7b7791
parent3140c08b2e098606763eece6bf53a2c48e069e05 (diff)
downloadfetchmail-18df438fd8963e044440378d1d91e8b18066d4ea.tar.gz
fetchmail-18df438fd8963e044440378d1d91e8b18066d4ea.tar.bz2
fetchmail-18df438fd8963e044440378d1d91e8b18066d4ea.zip
Second pass at OPIE.
svn path=/trunk/; revision=1408
-rw-r--r--pop3.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pop3.c b/pop3.c
index c6de4333..665bd9ea 100644
--- a/pop3.c
+++ b/pop3.c
@@ -144,14 +144,17 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting)
* Special case in case we're running Craig Metz's
* OPIE daemon. Code in opiegenerator() will detect this.
*/
- if (ctl->password && !strcmp(ctl->password, "opie"))
+ if (strcmp(ctl->password, "opie") == 0)
{
if (ok = opiegenerator(challenge, "", response))
if (ok != 2)
PROTOCOL_ERROR
}
- /* otherwise generate a challenge from the secret we have */
+ /*
+ * Otherwise, generate a challenge from whatever secret we
+ * have previously collected.
+ */
else if (opiegenerator(challenge, ctl->password, response))
PROTOCOL_ERROR