I'm not sure that the code to manually get groups from grp.getgrall() is correct. Why not relying on the *current* groups, os.getgroups()?
Note: there is also os.getgrouplist(), I'm not sure of the difference between os.getgroups() and os.getgrouplist(). I know that os.getgrouplist() was modified recently to use:
* NGROUPS_MAX is defined by POSIX.1 as the maximum
* number of supplimental groups a users can belong to.
* We have to increment it by one because
* getgrouplist() returns both the supplemental groups
* and the primary group, i.e. all of the groups the
* user belongs to.
ngroups = 1 + MAX_GROUPS;
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
The text was updated successfully, but these errors were encountered: