[issue40014] os.getgrouplist() can fail on macOS if the user has more than 17 groups

STINNER Victor report at bugs.python.org
Tue Mar 24 13:51:27 EDT 2020


STINNER Victor <vstinner at python.org> added the comment:

Ned: so Linux was also impacted, but Linux only has an issue with more than 65536 groups :-D macOS MAX_GROUPS is now only 16 (Python uses MAX_GROUPS+1)! Maybe MAX_GROUPS was reduced recently. I'm not sure.

Anyway, os.getgrouplist() does no longer depend on MAX_GROUPS hardcoded limit, but grow the group list dynamically. It should now work with any number of groups an all platforms (which provide the getgrouplist() function ;-)) on Python 3.7, 3.8 and master branches.

Thanks Dong-hee Na for the bug report and your PR.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40014>
_______________________________________


More information about the Python-bugs-list mailing list