[issue39821] grp library functions grp.getgrnam() & grp.getgrgid() returning incorrect gr_mem information
Ammar Askar
report at bugs.python.org
Mon Mar 2 00:08:32 EST 2020
Ammar Askar <ammar at ammaraskar.com> added the comment:
I can't re-create this locally (tested on master and 3.5.2):
ammar at cowlick:~/cpython$ getent group | grep testgroup
testgroup:x:1008:ammar,root
ammar at cowlick:~/cpython$ ./python
Python 3.9.0a4+ (heads/master:02a4d57, Feb 27 2020, 01:54:32)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import grp
>>> grp.getgrnam('testgroup')
grp.struct_group(gr_name='testgroup', gr_passwd='x', gr_gid=1008, gr_mem=['ammar', 'root'])
Both getgrnam and getgrall use the same underlying function to convert the `struct group` so this might be a problem with your libc. Could you post your distro info?
----------
nosy: +ammar2
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39821>
_______________________________________
More information about the Python-bugs-list
mailing list