Fixes #2924: User creation always reports 'changed'

reviewable/pr18780/r1
Scott Sturdivant 12 years ago
parent 3926f76644
commit ffb50dfb34

@ -395,7 +395,7 @@ class User(object):
groups = []
info = self.get_pwd_info()
for group in grp.getgrall():
if self.name in group[3] and info[3] != group[2]:
if self.name in group.gr_mem and info[3] == group.gr_gid:
groups.append(group[0])
return groups

Loading…
Cancel
Save