[issue7900] posix.getgroups() failure on Mac OS X

Alexander Belopolsky report at bugs.python.org
Tue Feb 23 15:42:22 CET 2010


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

On Tue, Feb 23, 2010 at 8:46 AM, Ronald Oussoren <report at bugs.python.org> wrote:
..
> What I did notice though is that the tests don't actually test the issue at hand:
> having more than 16 secondairy groups on OSX.

This is easy to fix: just add another entry in groups

+    def test_setgroups(self):
+        for groups in [[0], range(16)]:

I did not do it for two reasons:

1. Laziness. :-)  It was easier for me to just replace "16" above with
other values in my tests than to introduce platform checks.  I believe
16 groups is supported on all relevant platforms.

2. I am not sure python should support non-posix behavior and allow
more than os.sysconf('SC_NGROUPS_MAX') groups to be returned from
os.getgroups().  IMO, users who need more than 16 groups on OSX should
bug Apple to fix sysconf(_SC_NGROUPS_MAX).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7900>
_______________________________________


More information about the Python-bugs-list mailing list