xref: /csrg-svn/lib/libc/gen/getpwuid.c (revision 22097)
1*22097Smckusick #ifndef lint
2*22097Smckusick static char sccsid[] = "@(#)getpwuid.c	5.1 (Berkeley) 06/05/85";
3*22097Smckusick #endif not lint
4*22097Smckusick 
52021Swnj #include <pwd.h>
62021Swnj 
72021Swnj struct passwd *
getpwuid(uid)82021Swnj getpwuid(uid)
92021Swnj register uid;
102021Swnj {
112021Swnj 	register struct passwd *p;
122021Swnj 	struct passwd *getpwent();
132021Swnj 
142021Swnj 	setpwent();
152021Swnj 	while( (p = getpwent()) && p->pw_uid != uid );
162021Swnj 	endpwent();
172021Swnj 	return(p);
182021Swnj }
19