Blame SOURCES/00157-uid-gid-overflows.patch

6e8c2f
diff -up Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows Python-2.7.3/Lib/test/test_os.py
6e8c2f
--- Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows	2012-04-09 19:07:32.000000000 -0400
6e8c2f
+++ Python-2.7.3/Lib/test/test_os.py	2012-06-26 14:51:36.000817929 -0400
6e8c2f
@@ -677,30 +677,36 @@ if sys.platform != 'win32':
6e8c2f
             def test_setuid(self):
6e8c2f
                 if os.getuid() != 0:
6e8c2f
                     self.assertRaises(os.error, os.setuid, 0)
6e8c2f
+                self.assertRaises(TypeError, os.setuid, 'not an int')
6e8c2f
                 self.assertRaises(OverflowError, os.setuid, 1<<32)
6e8c2f
 
6e8c2f
         if hasattr(os, 'setgid'):
6e8c2f
             def test_setgid(self):
6e8c2f
                 if os.getuid() != 0:
6e8c2f
                     self.assertRaises(os.error, os.setgid, 0)
6e8c2f
+                self.assertRaises(TypeError, os.setgid, 'not an int')
6e8c2f
                 self.assertRaises(OverflowError, os.setgid, 1<<32)
6e8c2f
 
6e8c2f
         if hasattr(os, 'seteuid'):
6e8c2f
             def test_seteuid(self):
6e8c2f
                 if os.getuid() != 0:
6e8c2f
                     self.assertRaises(os.error, os.seteuid, 0)
6e8c2f
+                self.assertRaises(TypeError, os.seteuid, 'not an int')
6e8c2f
                 self.assertRaises(OverflowError, os.seteuid, 1<<32)
6e8c2f
 
6e8c2f
         if hasattr(os, 'setegid'):
6e8c2f
             def test_setegid(self):
6e8c2f
                 if os.getuid() != 0:
6e8c2f
                     self.assertRaises(os.error, os.setegid, 0)
6e8c2f
+                self.assertRaises(TypeError, os.setegid, 'not an int')
6e8c2f
                 self.assertRaises(OverflowError, os.setegid, 1<<32)
6e8c2f
 
6e8c2f
         if hasattr(os, 'setreuid'):
6e8c2f
             def test_setreuid(self):
6e8c2f
                 if os.getuid() != 0:
6e8c2f
                     self.assertRaises(os.error, os.setreuid, 0, 0)
6e8c2f
+                self.assertRaises(TypeError, os.setreuid, 'not an int', 0)
6e8c2f
+                self.assertRaises(TypeError, os.setreuid, 0, 'not an int')
6e8c2f
                 self.assertRaises(OverflowError, os.setreuid, 1<<32, 0)
6e8c2f
                 self.assertRaises(OverflowError, os.setreuid, 0, 1<<32)
6e8c2f
 
6e8c2f
@@ -715,6 +721,8 @@ if sys.platform != 'win32':
6e8c2f
             def test_setregid(self):
6e8c2f
                 if os.getuid() != 0:
6e8c2f
                     self.assertRaises(os.error, os.setregid, 0, 0)
6e8c2f
+                self.assertRaises(TypeError, os.setregid, 'not an int', 0)
6e8c2f
+                self.assertRaises(TypeError, os.setregid, 0, 'not an int')
6e8c2f
                 self.assertRaises(OverflowError, os.setregid, 1<<32, 0)
6e8c2f
                 self.assertRaises(OverflowError, os.setregid, 0, 1<<32)
6e8c2f