Ronald Oussoren <ronaldousso...@mac.com> added the comment:

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.

----------
stage:  -> patch review
Added file: http://bugs.python.org/file16333/os-getgroups.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7900>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to