1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #1445 from sfromm/issue1439

Skip check of primary group when checking other group membership
This commit is contained in:
Michael DeHaan 2012-10-25 03:58:17 -07:00
commit 895715b65b

View file

@ -314,7 +314,7 @@ def user_group_membership(user):
groups = []
info = get_pwd_info(user)
for group in grp.getgrall():
if user in group[3] and info[3] != group[2]:
if user in group[3]:
groups.append(group[0])
return groups