summaryrefslogtreecommitdiff
path: root/lang/python26
diff options
context:
space:
mode:
authortez <tez>2010-11-17 18:44:06 +0000
committertez <tez>2010-11-17 18:44:06 +0000
commit2451aa47562b5707a9a021b9f60277667960e1b9 (patch)
tree7d84b6675e11e99f38d0dd000059c45321d82c19 /lang/python26
parenta8677607107d1985873968e65547090f01e83a35 (diff)
downloadpkgsrc-2451aa47562b5707a9a021b9f60277667960e1b9.tar.gz
Add fix for SA41968 (CVE-2010-3493) from the 2.7 branch repo
http://svn.python.org/view/python/branches/release27-maint/Lib/smtpd.py?r1=86084 &r2=82503&view=patch
Diffstat (limited to 'lang/python26')
-rw-r--r--lang/python26/Makefile4
-rw-r--r--lang/python26/distinfo3
-rw-r--r--lang/python26/patches/patch-aw39
3 files changed, 43 insertions, 3 deletions
diff --git a/lang/python26/Makefile b/lang/python26/Makefile
index 939cbc20a15..f013e4c4a90 100644
--- a/lang/python26/Makefile
+++ b/lang/python26/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.29 2010/09/17 07:11:42 obache Exp $
+# $NetBSD: Makefile,v 1.30 2010/11/17 18:44:06 tez Exp $
.include "dist.mk"
PKGNAME= python26-${PY_DISTVERSION}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= lang python
MAINTAINER= pkgsrc-users@NetBSD.org
diff --git a/lang/python26/distinfo b/lang/python26/distinfo
index d4001e9c94f..953202905e6 100644
--- a/lang/python26/distinfo
+++ b/lang/python26/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2010/09/22 09:13:47 obache Exp $
+$NetBSD: distinfo,v 1.28 2010/11/17 18:44:06 tez Exp $
SHA1 (Python-2.6.6.tar.bz2) = a1daf2c2c7cffe0939c015260447572fe75c7e50
RMD160 (Python-2.6.6.tar.bz2) = 2d63f4f0ad3c124a8e62215ca94bd0231350e912
@@ -16,3 +16,4 @@ SHA1 (patch-ao) = 8c6a156b0f0c2a6d319658477fff348e6a0c3603
SHA1 (patch-ap) = d23a869a449ab9dc166cfa149913b20c9acad9cb
SHA1 (patch-au) = 38030fc45afc2a8f53a41f26b649e731642b9148
SHA1 (patch-av) = d6bf0419015656a8d2f13d3132873e453c8a6b6e
+SHA1 (patch-aw) = e74bae33eb95c821b5147f5c89c3ee7cb061db95
diff --git a/lang/python26/patches/patch-aw b/lang/python26/patches/patch-aw
new file mode 100644
index 00000000000..c3b5f7203ab
--- /dev/null
+++ b/lang/python26/patches/patch-aw
@@ -0,0 +1,39 @@
+$NetBSD: patch-aw,v 1.1 2010/11/17 18:44:07 tez Exp $
+
+Fix for SA41968 (CVE-2010-3493) from the 2.7 branch repo
+http://svn.python.org/view/python/branches/release27-maint/Lib/smtpd.py?r1=86084&r2=82503&view=patch
+
+--- Lib/smtpd2.6.py.orig 2010-06-30 12:41:25.000000000 -0500
++++ Lib/smtpd2.6.py 2010-11-17 12:19:14.825489100 -0600
+@@ -121,7 +121,15 @@
+ self.__rcpttos = []
+ self.__data = ''
+ self.__fqdn = socket.getfqdn()
+- self.__peer = conn.getpeername()
++ try:
++ self.__peer = conn.getpeername()
++ except socket.error, err:
++ # a race condition may occur if the other end is closing
++ # before we can get the peername
++ self.close()
++ if err[0] != errno.ENOTCONN:
++ raise
++ return
+ print >> DEBUGSTREAM, 'Peer:', repr(self.__peer)
+ self.push('220 %s %s' % (self.__fqdn, __version__))
+ self.set_terminator('\r\n')
+@@ -291,9 +299,11 @@
+ localaddr, remoteaddr)
+
+ def handle_accept(self):
+- conn, addr = self.accept()
+- print >> DEBUGSTREAM, 'Incoming connection from %s' % repr(addr)
+- channel = SMTPChannel(self, conn, addr)
++ pair = self.accept()
++ if pair is not None:
++ conn, addr = pair
++ print >> DEBUGSTREAM, 'Incoming connection from %s' % repr(addr)
++ channel = SMTPChannel(self, conn, addr)
+
+ # API for "doing something useful with the message"
+ def process_message(self, peer, mailfrom, rcpttos, data):