Message99759
Here is another interesting fact: Mac OS 10.6 comes with python 2.5 and 2.6 preinstalled:
$ python2.5 -V
Python 2.5.3c1
$ python2.6 -V
Python 2.6.1
Neither of these exhibit the same bug, but both are broken in some way. Given
$ cat tg.py
import os
g = os.getgroups()
print g
os.setgroups(g[:5])
print os.getgroups()
$ sudo python2.5 tg.py
[0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2]
[0, 101, 204, 100, 98]
$ sudo python2.6 tg.py
[0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2, 1, 401]
[0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2, 1, 401]
Note that python2.5 truncates the group list which is
$ sudo id -G
0 101 204 100 98 80 61 29 20 12 9 8 5 4 3 2 1 401
but setgroups works as expected. In contrast, python2.6 reports all groups correctly, but setgroups has no effect. |
|
Date |
User |
Action |
Args |
2010-02-22 15:57:41 | Alexander.Belopolsky | set | recipients:
+ Alexander.Belopolsky, loewis, ronaldoussoren, orsenthil, michael.foord, l0nwlf |
2010-02-22 15:57:41 | Alexander.Belopolsky | set | messageid: <1266854261.19.0.272852387087.issue7900@psf.upfronthosting.co.za> |
2010-02-22 15:57:40 | Alexander.Belopolsky | link | issue7900 messages |
2010-02-22 15:57:39 | Alexander.Belopolsky | create | |
|