]> 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:40:31 +0000 (10:40 -0700)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 17:40:31 +0000 (10:40 -0700)
commitaf6fd1faa68f57c11c862624798f8510b7cac68a
treec04b78f88b16c828d1987e63a8c0b32b23ca863b
parent8cd48b60fde147087dca061e836c1a47156ac612
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