xref: /csrg-svn/lib/libc/gen/getpwnam.c (revision 22096)
1*22096Smckusick #ifndef lint
2*22096Smckusick static char sccsid[] = "@(#)getpwnam.c	5.1 (Berkeley) 06/05/85";
3*22096Smckusick #endif not lint
4*22096Smckusick 
52020Swnj #include <pwd.h>
62020Swnj 
72020Swnj struct passwd *
getpwnam(name)82020Swnj getpwnam(name)
92020Swnj char *name;
102020Swnj {
112020Swnj 	register struct passwd *p;
122020Swnj 	struct passwd *getpwent();
132020Swnj 
142020Swnj 	setpwent();
152020Swnj 	while( (p = getpwent()) && strcmp(name,p->pw_name) );
162020Swnj 	endpwent();
172020Swnj 	return(p);
182020Swnj }
19