diff options
Diffstat (limited to 'lang/python26/patches/patch-bc')
-rw-r--r-- | lang/python26/patches/patch-bc | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/lang/python26/patches/patch-bc b/lang/python26/patches/patch-bc new file mode 100644 index 00000000000..346ea056b15 --- /dev/null +++ b/lang/python26/patches/patch-bc @@ -0,0 +1,86 @@ +$NetBSD: patch-bc,v 1.1 2010/11/23 08:24:04 tron Exp $ + +Fix for CVE-2010-3492 and CVE-2010-3493, taken from the Python SVN repository: + +http://svn.python.org/view?view=rev&revision=86084 + +--- Lib/smtpd2.6.py.orig 2010-11-22 18:18:59.000000000 +0000 ++++ Lib/smtpd2.6.py 2010-11-22 18:19:03.000000000 +0000 +@@ -35,7 +35,6 @@ + and if remoteport is not given, then 25 is used. + """ + +- + # Overview: + # + # This file implements the minimal SMTP protocol as defined in RFC 821. It +@@ -96,7 +95,6 @@ + COMMASPACE = ', ' + + +- + def usage(code, msg=''): + print >> sys.stderr, __doc__ % globals() + if msg: +@@ -104,7 +102,6 @@ + sys.exit(code) + + +- + class SMTPChannel(asynchat.async_chat): + COMMAND = 0 + DATA = 1 +@@ -276,7 +273,6 @@ + self.push('354 End data with <CR><LF>.<CR><LF>') + + +- + class SMTPServer(asyncore.dispatcher): + def __init__(self, localaddr, remoteaddr): + self._localaddr = localaddr +@@ -331,7 +327,6 @@ + raise NotImplementedError + + +- + class DebuggingServer(SMTPServer): + # Do something with the gathered message + def process_message(self, peer, mailfrom, rcpttos, data): +@@ -347,7 +342,6 @@ + print '------------ END MESSAGE ------------' + + +- + class PureProxy(SMTPServer): + def process_message(self, peer, mailfrom, rcpttos, data): + lines = data.split('\n') +@@ -388,7 +382,6 @@ + return refused + + +- + class MailmanProxy(PureProxy): + def process_message(self, peer, mailfrom, rcpttos, data): + from cStringIO import StringIO +@@ -467,13 +460,11 @@ + msg.Enqueue(mlist, torequest=1) + + +- + class Options: + setuid = 1 + classname = 'PureProxy' + + +- + def parseargs(): + global DEBUGSTREAM + try: +@@ -530,7 +521,6 @@ + return options + + +- + if __name__ == '__main__': + options = parseargs() + # Become nobody |