summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-24 17:22:10 (GMT)
committerGitHub <noreply@github.com>2020-03-24 17:22:10 (GMT)
commitf5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7 (patch)
tree3fcf2f5173005198c8a959fc03195220e74ab53f /Misc
parent4b3252cb764807fdb3a661b458d43e4af55cf4df (diff)
downloadcpython-f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7.zip
cpython-f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7.tar.gz
cpython-f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7.tar.bz2
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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst b/Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
index 58f14fa..e9b36c2 100644
--- a/Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
+++ b/Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
@@ -1,3 +1,4 @@
-Fix ``os.getgrouplist()``: on macOS, the ``getgrouplist()`` function returns a
-non-zero value without setting ``errno`` if the group list is too small. Double
-the list size and call it again in this case.
+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.