/* @(#)getgrnam.c 2.1 SCCS id keyword */ #include struct group * getgrnam(name) register char *name; { register struct group *p; struct group *getgrent(); setgrent(); while( (p = getgrent()) && strcmp(p->gr_name,name) ); endgrent(); return(p); }