aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2021-08-31 17:02:59 +0200
committerMatthias Andree <matthias.andree@gmx.de>2021-09-01 17:12:02 +0200
commit34656a01b9b15b1be28ccc2ef699cca171bef261 (patch)
treeb933c6a09c4dbb19272f2bd37ccd7a9678403bf6 /imap.c
parent431ccf32e8b6a2e4cf07b49f543bb99e00c7efcf (diff)
downloadfetchmail-34656a01b9b15b1be28ccc2ef699cca171bef261.tar.gz
fetchmail-34656a01b9b15b1be28ccc2ef699cca171bef261.tar.bz2
fetchmail-34656a01b9b15b1be28ccc2ef699cca171bef261.zip
IMAP: fix error code when LOGIN fails
This recently printed 'we've run out of authentication methods' instead of the actual authentication failure.
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/imap.c b/imap.c
index a14139b6..f57c3e0f 100644
--- a/imap.c
+++ b/imap.c
@@ -732,13 +732,7 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting)
memset(password, 0x55, strlen(password));
xfree(password);
xfree(remotename);
- if (ok)
- {
- if(ctl->server.authenticate != A_ANY)
- return ok;
- }
- else
- return(ok);
+ return ok; /* this assumes that password is the last authentication method to try */
}
}