summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Fitzgerald <gregf@gentoo.org>2003-11-20 01:01:05 +0000
committerGreg Fitzgerald <gregf@gentoo.org>2003-11-20 01:01:05 +0000
commit704031f5f81cdab8ec920abdd6eaa5b6eb3e671f (patch)
treee7cceac74bcae8d505e43b45d60a841982b1563c /net-mail/tpop3d/files
parentVersion bump. (diff)
downloadhistorical-704031f5f81cdab8ec920abdd6eaa5b6eb3e671f.tar.gz
historical-704031f5f81cdab8ec920abdd6eaa5b6eb3e671f.tar.bz2
historical-704031f5f81cdab8ec920abdd6eaa5b6eb3e671f.zip
Version bump.
Diffstat (limited to 'net-mail/tpop3d/files')
-rw-r--r--net-mail/tpop3d/files/digest-tpop3d-1.5.22
-rw-r--r--net-mail/tpop3d/files/tpop3d-1.5.2-fix-AV-problem.patch36
2 files changed, 38 insertions, 0 deletions
diff --git a/net-mail/tpop3d/files/digest-tpop3d-1.5.2 b/net-mail/tpop3d/files/digest-tpop3d-1.5.2
new file mode 100644
index 000000000000..fa86fdfc7eb4
--- /dev/null
+++ b/net-mail/tpop3d/files/digest-tpop3d-1.5.2
@@ -0,0 +1,2 @@
+MD5 1bd2fa0a8a0da9d7ee0f4c5723006631 tpop3d-1.5.2.tar.gz 235769
+MD5 b40cd6aa6ab9186588d4c6ab10167a8f tpop3d-1.5.2-fix-AV-problem.patch 1710
diff --git a/net-mail/tpop3d/files/tpop3d-1.5.2-fix-AV-problem.patch b/net-mail/tpop3d/files/tpop3d-1.5.2-fix-AV-problem.patch
new file mode 100644
index 000000000000..b634b61e2d63
--- /dev/null
+++ b/net-mail/tpop3d/files/tpop3d-1.5.2-fix-AV-problem.patch
@@ -0,0 +1,36 @@
+--- connection.c 14 Jul 2003 23:31:20 -0000 1.49
++++ connection.c 30 Sep 2003 18:52:19 -0000
+@@ -381,9 +381,30 @@
+ * Send a +OK... / -ERR... response to a message. Returns 1 on success or 0 on
+ * failure. */
+ int connection_sendresponse(connection c, const int success, const char *s) {
+- if (connection_send(c, success ? "+OK " : "-ERR ", success ? 4 : 5)
+- && connection_send(c, s, strlen(s))
+- && connection_send(c, "\r\n", 2)) {
++ /*
++ * For efficiency's sake, we should send this bit-by-bit, avoiding another
++ * buffer copy. But unfortunately, there are POP3 clients in the world
++ * so stupid that they assume a whole response will arrive in a single TCP
++ * segment. Particular examples include POP3 virus-scanning proxies, such
++ * as Norman ASA's, which was evidently written by somebody very lazy.
++ *
++ * Obviously there's no way to guarantee how the packets in a TCP stream
++ * are disposed, in general, but we can increase the probability of success
++ * by trying to ensure here that our response is contained in a single
++ * write call. It still might get split up by the ioabs layer, but we have
++ * to take our chances....
++ */
++ static char *buf;
++ static size_t buflen;
++ size_t l;
++
++ l = (success ? 6 : 7) + strlen(s);
++
++ if (!buf || buflen < l + 1)
++ buf = xrealloc(buf, buflen = l + 1);
++
++ sprintf(buf, "%s %s\r\n", success ? "+OK" : "-ERR", s);
++ if (connection_send(c, buf, l)) {
+ if (verbose)
+ log_print(LOG_DEBUG, _("connection_sendresponse: client %s: sent %s %s'"), c->idstr, success ? "+OK" : "-ERR", s);
+ return 1;