[issue7900] posix.getgroups() failure on Mac OS X
Alexander Belopolsky
report at bugs.python.org
Tue Feb 23 16:33:25 CET 2010
Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:
E-mail to tracker handling still seems to remove '>' quoted lines. I am reposting a couple of comments that got clobbered:
--
> * allocate an array of groupcount gid_t's and call getgroups(groupcount)
>
This is more or less what my original patch did, but it suffers from a
race condition.
> I'll work on a patch that implements this.
>
I am attaching a patch that I wrote yesterday, but did not submit
because it does not fix setgroups. I am attaching it now so that we
can compare our approaches.
--
> Wrt. the value of MAX_GROUPS on Linux: we could change the test that defined > MAX_GROUPS to ensure that the value doesn't get too large, from:
>
> #ifdef NGROUPS_MAX
>
>
> to:
>
> #if defined(NGROUPS_MAX) && NGROUPS_MAX <= 64
>
> This combined with my patch would result in less stack usage while still working > when a user has a lot of secondary groups.
>
Makes sense regardless of the approach.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7900>
_______________________________________
More information about the Python-bugs-list
mailing list