From d7f15235d0e01adc731834d0a28f28c09894b925 Mon Sep 17 00:00:00 2001 From: Martin Holzer Date: Wed, 3 Mar 2004 17:16:02 +0000 Subject: header fix --- .../tpop3d/files/tpop3d-1.5.2-fix-AV-problem.patch | 36 ---------------------- net-mail/tpop3d/files/tpop3d-init | 6 ++-- 2 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 net-mail/tpop3d/files/tpop3d-1.5.2-fix-AV-problem.patch (limited to 'net-mail/tpop3d/files') 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 deleted file mode 100644 index b634b61e2d63..000000000000 --- a/net-mail/tpop3d/files/tpop3d-1.5.2-fix-AV-problem.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- 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; diff --git a/net-mail/tpop3d/files/tpop3d-init b/net-mail/tpop3d/files/tpop3d-init index 6f9f68b515a1..ec0b0190b491 100644 --- a/net-mail/tpop3d/files/tpop3d-init +++ b/net-mail/tpop3d/files/tpop3d-init @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-mail/tpop3d/files/tpop3d-init,v 1.1 2003/08/03 04:44:34 iggy Exp $ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/tpop3d/files/tpop3d-init,v 1.2 2004/03/03 17:16:02 mholzer Exp $ depend() { need net -- cgit v1.2.3-65-gdbad