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, r.david.murray, ronaldoussoren
Date 2010-02-23.13:46:32
SpamBayes Score 1.6037262e-08
Marked as misclassified No
Message-id <1266932795.31.0.207724978264.issue7900@psf.upfronthosting.co.za>
In-reply-to
Content
My patch is very lightly tested and I didn't try to use the additional testcases. 

I get test failures, but no crashes, when I do run the additional tests. I haven't had time to review the testcases though. 

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.

I'm not too thrilled about your approach of growing the grouplist argument of getgroups until the results fit, the comment in the coreutils sources refers to two very old unix flavors and IMHO it is not worthwhile to try to support those.

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.


I agree that Apple's patch is broken, it almost certainly reads the secondary groups from the user database instead of returning the actual value for the running process (based on the prototype and additional includes).
History
Date User Action Args
2010-02-23 13:46:35ronaldoussorensetrecipients: + ronaldoussoren, loewis, orsenthil, r.david.murray, michael.foord, Alexander.Belopolsky, l0nwlf
2010-02-23 13:46:35ronaldoussorensetmessageid: <1266932795.31.0.207724978264.issue7900@psf.upfronthosting.co.za>
2010-02-23 13:46:33ronaldoussorenlinkissue7900 messages
2010-02-23 13:46:32ronaldoussorencreate