An interpreted, interactive, object-oriented programming language
CentOS Sources
2017-08-01 71084d584ff953f5463757ec6536406320560b4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff -up Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows Python-2.7.3/Lib/test/test_os.py
--- Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows    2012-04-09 19:07:32.000000000 -0400
+++ Python-2.7.3/Lib/test/test_os.py    2012-06-26 14:51:36.000817929 -0400
@@ -677,30 +677,36 @@ if sys.platform != 'win32':
             def test_setuid(self):
                 if os.getuid() != 0:
                     self.assertRaises(os.error, os.setuid, 0)
+                self.assertRaises(TypeError, os.setuid, 'not an int')
                 self.assertRaises(OverflowError, os.setuid, 1<<32)
 
         if hasattr(os, 'setgid'):
             def test_setgid(self):
                 if os.getuid() != 0:
                     self.assertRaises(os.error, os.setgid, 0)
+                self.assertRaises(TypeError, os.setgid, 'not an int')
                 self.assertRaises(OverflowError, os.setgid, 1<<32)
 
         if hasattr(os, 'seteuid'):
             def test_seteuid(self):
                 if os.getuid() != 0:
                     self.assertRaises(os.error, os.seteuid, 0)
+                self.assertRaises(TypeError, os.seteuid, 'not an int')
                 self.assertRaises(OverflowError, os.seteuid, 1<<32)
 
         if hasattr(os, 'setegid'):
             def test_setegid(self):
                 if os.getuid() != 0:
                     self.assertRaises(os.error, os.setegid, 0)
+                self.assertRaises(TypeError, os.setegid, 'not an int')
                 self.assertRaises(OverflowError, os.setegid, 1<<32)
 
         if hasattr(os, 'setreuid'):
             def test_setreuid(self):
                 if os.getuid() != 0:
                     self.assertRaises(os.error, os.setreuid, 0, 0)
+                self.assertRaises(TypeError, os.setreuid, 'not an int', 0)
+                self.assertRaises(TypeError, os.setreuid, 0, 'not an int')
                 self.assertRaises(OverflowError, os.setreuid, 1<<32, 0)
                 self.assertRaises(OverflowError, os.setreuid, 0, 1<<32)
 
@@ -715,6 +721,8 @@ if sys.platform != 'win32':
             def test_setregid(self):
                 if os.getuid() != 0:
                     self.assertRaises(os.error, os.setregid, 0, 0)
+                self.assertRaises(TypeError, os.setregid, 'not an int', 0)
+                self.assertRaises(TypeError, os.setregid, 0, 'not an int')
                 self.assertRaises(OverflowError, os.setregid, 1<<32, 0)
                 self.assertRaises(OverflowError, os.setregid, 0, 1<<32)