This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author woodfighter
Recipients docs@python, woodfighter
Date 2020-04-24.11:03:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587726234.05.0.711517383833.issue40376@roundup.psfhosted.org>
In-reply-to
Content
https://docs.python.org/3/library/os.html#os.getgrouplist states „Return list of group ids that user belongs to. If group is not in the list, it is included; typically, group is specified as the group ID field from the password record for user.“, but the function is at least on Linux a wrapper for getgrouplist from the C standard library, which lists only the membership in groups in the group-database. Users can be members of groups without it being declared in the group database, this is often the case with the default group of the user which is only declared in the passwd database.

e.g. 
/etc/passwd: woodfighter:x:1000:1000:,,,:/home/woodfighter:/bin/bash
/etc/group: woodfighter:x:1000:

os.getgrouplist("woodfighter",65534) then doesn't contain group id 1000.

The documentation tries to steer a developer in the right direction with the second sentence but fails to state, that the list will be possibly incomplete otherwise. I would add something like „, because that group ID will otherwise be potentially omitted.“ before the last period.
History
Date User Action Args
2020-04-24 11:03:54woodfightersetrecipients: + woodfighter, docs@python
2020-04-24 11:03:54woodfightersetmessageid: <1587726234.05.0.711517383833.issue40376@roundup.psfhosted.org>
2020-04-24 11:03:53woodfighterlinkissue40376 messages
2020-04-24 11:03:53woodfightercreate