diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2002-10-18 15:29:36 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2002-10-18 15:29:36 +0000 |
commit | f63186b4bd9a6439ff93ce48897f8df659062691 (patch) | |
tree | 84b92ec5e40bf1d48fc317fd4c916c20e5f9f5ff /imap.c | |
parent | 0f19cf5f3f3ee4637609c61d0ac2b862d82204ad (diff) | |
download | fetchmail-f63186b4bd9a6439ff93ce48897f8df659062691.tar.gz fetchmail-f63186b4bd9a6439ff93ce48897f8df659062691.tar.bz2 fetchmail-f63186b4bd9a6439ff93ce48897f8df659062691.zip |
Handle servers with LOGINDISABLED.
svn path=/trunk/; revision=3747
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -451,10 +451,15 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting) } #endif /* __UNUSED__ */ - /* we're stuck with sending the password en clair */ - if ((ctl->server.authenticate == A_ANY - || ctl->server.authenticate == A_PASSWORD) - && !strstr (capabilities, "LOGINDISABLED")) + /* + * We're stuck with sending the password en clair. + * The reason for this odd-looking logic is that some + * servers return LOGINDISABLED even though login + * actually works. So arrange things in such a way that + * setting auth passwd makes it ignore this capability. + */ + if((ctl->server.authenticate==A_ANY&&!strstr(capabilities,"LOGINDISABLED")) + || ctl->server.authenticate == A_PASSWORD) { /* these sizes guarantee no buffer overflow */ char remotename[NAMELEN*2+1], password[PASSWORDLEN*2+1]; |