diff options
| author | Eric S. Raymond <esr@thyrsus.com> | 2000-04-08 06:34:15 +0000 | 
|---|---|---|
| committer | Eric S. Raymond <esr@thyrsus.com> | 2000-04-08 06:34:15 +0000 | 
| commit | 88de3aa407f15cb333caf267e50453ef4338d1fb (patch) | |
| tree | 6fa83febef7d609549cdd4f035f3cb7743a4e0d4 | |
| parent | 32cf48a357ed372b9135aff60ea794b3db61bae6 (diff) | |
| download | fetchmail-88de3aa407f15cb333caf267e50453ef4338d1fb.tar.gz fetchmail-88de3aa407f15cb333caf267e50453ef4338d1fb.tar.bz2 fetchmail-88de3aa407f15cb333caf267e50453ef4338d1fb.zip  | |
Preauth fix.
svn path=/trunk/; revision=2864
| -rw-r--r-- | NEWS | 1 | ||||
| -rw-r--r-- | imap.c | 17 | 
2 files changed, 7 insertions, 11 deletions
@@ -10,6 +10,7 @@  * Added contrib/toprocmail, which demonstrates how a plugin can    displaty selected mail headers.  * French internationalization update from Guy Brand. +* IMAP PREAUTH fix from Todd Sabin <tas@webspan.net>.  fetchmail-5.3.5 (Wed Mar 29 18:17:19 EST 2000), 18840 lines: @@ -130,14 +130,7 @@ int imap_ok(int sock, char *argbuf)  	while (isspace(*cp))  	    cp++; -	if (strncmp(cp, "PREAUTH", 2) == 0) -	{ -	    if (argbuf) -		strcpy(argbuf, cp); -	    preauth = TRUE; -	    return(PS_SUCCESS); -	} -	else if (strncmp(cp, "OK", 2) == 0) +        if (strncmp(cp, "OK", 2) == 0)  	{  	    if (argbuf)  		strcpy(argbuf, cp); @@ -860,7 +853,6 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)      /* probe to see if we're running IMAP4 and can use RFC822.PEEK */      capabilities[0] = '\0'; -    preauth = FALSE;      if ((ok = gen_transact(sock, "CAPABILITY")) == PS_SUCCESS)      {  	/* UW-IMAP server 10.173 notifies in all caps */ @@ -898,11 +890,14 @@ int imap_getauth(int sock, struct query *ctl, char *greeting)  	expunge_period = 1;      /*  -     * If either (a) we saw a PREAUTH token in the capability response, or +     * If either (a) we saw a PREAUTH token in the greeting, or       * (b) the user specified ssh preauthentication, then we're done.       */      if (preauth || ctl->server.preauthenticate == A_SSH) -	return(PS_SUCCESS); +    { +        preauth = FALSE;  /* reset for the next session */ +        return(PS_SUCCESS); +    }      /*        * Handle idling.  We depend on coming through here on startup  | 
