'Extract the members of each group from /etc/gshadow.
Identifies the groups in /etc/gshadow and several attributes of the group,
including how the password is crypted (if set).
gshadow files have the format group_name:passwd:admins:members
admins are both group members and can manage passwords and memberships.
Args:
line: An entry in gshadow.'

def ParseGshadowEntry(self, line):

    fields = ('name', 'passwd', 'administrators', 'members')
    if line:
        rslt = dict(zip(fields, line.split(':')))
        name = rslt['name']
        pw_entry = self.shadow.setdefault(name, rdf_client.PwEntry())
        pw_entry.store = self.shadow_store
        pw_entry.hash_type = self.GetHashType(rslt['passwd'])
        members = self.gshadow_members.setdefault(name, set())
        for accts in (rslt['administrators'], rslt['members']):
            if accts:
                members.update(accts.split(','))
