This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients Alexander.Belopolsky, l0nwlf, loewis, michael.foord, orsenthil, ronaldoussoren
Date 2010-02-23.08:29:10
SpamBayes Score 1.6653345e-16
Marked as misclassified No
Message-id <1266913754.6.0.164189864496.issue7900@psf.upfronthosting.co.za>
In-reply-to
Content
On my system with the attached patch (os-getgroups.patch):

$ sudo ./python.exe
Python 2.7a3+ (trunk:78371M, Feb 23 2010, 09:19:44) 
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getgroups()
[11, 0, 11, 0, 3, 61, 29, 20, 3511889, 1, 3368710, 1, 2, 0, 1537888, 1, 223]
>>> len(_)
17
>>> 


I haven't tested yet if this version works on other platforms, but at least on Linux and HP-UX the manpage is similar enough to the one on OSX that I expect it to work there as well. (All 3 manpage say that getroups(0, grouplist) returns the number of secondary groups without modifying the grouplist argument).


BTW. os.setgroups also needs fixing for OSX: as it is a python script cannot set the grouplist to a value with more than 16 entries, even though the system is obviously capable of doing just that.

BTW2. The patch is for the trunk.
History
Date User Action Args
2010-02-23 08:29:14ronaldoussorensetrecipients: + ronaldoussoren, loewis, orsenthil, michael.foord, Alexander.Belopolsky, l0nwlf
2010-02-23 08:29:14ronaldoussorensetmessageid: <1266913754.6.0.164189864496.issue7900@psf.upfronthosting.co.za>
2010-02-23 08:29:12ronaldoussorenlinkissue7900 messages
2010-02-23 08:29:11ronaldoussorencreate