int pr_ListMembers(prname group, namelist *lnames) { afs_int32 code; afs_int32 gid; int i; memset(lnames, 0, sizeof(namelist)); /* pr_SNameToId checks the length of group. */ code = pr_SNameToId(group, &gid); if (code) return code; if (gid == ANONYMOUSID) return PRNOENT; code = pr_IDListMembers(gid, lnames); if (code) return code; for (i = 0; i < lnames->namelist_len; i++) { code = check_length(lnames->namelist_val[i]); if (code) return code; } return code; }
int pr_ListMembers(char *group, namelist *lnames) { afs_int32 code; afs_int32 gid; code = pr_SNameToId(group, &gid); if (code) return code; if (gid == ANONYMOUSID) return PRNOENT; code = pr_IDListMembers(gid, lnames); return code; }