diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-11 05:41:31 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-11 05:41:31 +0000 |
commit | 4195370e9a4915b338962f7035feda9f0a7c430b (patch) | |
tree | 4fd240a3ab121a7e83cf61548ca7da223e7ed1a1 | |
parent | ed560011d0e754ed43af58bb925dd347e66af021 (diff) | |
download | fetchmail-4195370e9a4915b338962f7035feda9f0a7c430b.tar.gz fetchmail-4195370e9a4915b338962f7035feda9f0a7c430b.tar.bz2 fetchmail-4195370e9a4915b338962f7035feda9f0a7c430b.zip |
Try to get around the CRAM-MD5 bug.
svn path=/trunk/; revision=3044
-rw-r--r-- | cram.c | 19 |
1 files changed, 5 insertions, 14 deletions
@@ -129,22 +129,13 @@ int do_cram_md5 (int sock, struct query *ctl) report (stdout, "CRAM> %s\n", buf1); } + /* ship the authentication back, accept the server's responses */ /* PMDF5.2 IMAP has a bug that requires this to be a single write */ - strcat (buf1, "\r\n"); - SockWrite (sock, buf1, strlen (buf1)); - - if ((result = gen_recv (sock, buf1, sizeof (buf1)))) - return result; - - /* - * Ugh. This has to recognize all kinds of success lines. - * These two tests will catch IMAP and POP OK or SMTP-like - * protocols that use 2xx as a success indication. - */ - if (buf1[0] = '2' || strstr(buf1, "OK")) + result = gen_transact(sock, buf1, sizeof(buf1)); + if (result) + return(result); + else return(PS_SUCCESS); - else - return(PS_AUTHFAIL); } /* cram.c ends here */ |