]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40014: Fix os.getgrouplist() (GH-19126)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 24 Mar 2020 17:39:15 +0000 (10:39 -0700)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 17:39:15 +0000 (10:39 -0700)
commit5753fc69977bd9f70ecb4d466bda650efccf9e0a
tree3f3ca2a2e1d9a78b884a0c8cb9eba7bc17e32bf9
parentd1c09896c3b91d0ad7e3a14fabecde268f70dac7
bpo-40014: Fix os.getgrouplist() (GH-19126)

Fix os.getgrouplist(): if getgrouplist() function fails because the
group list is too small, retry with a larger group list.

On failure, the glibc implementation of getgrouplist() sets ngroups
to the total number of groups. For other implementations, double the
group list size.
(cherry picked from commit f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7)

Co-authored-by: Victor Stinner <vstinner@python.org>
Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
Modules/posixmodule.c