xref: /csrg-svn/lib/libc/gen/getpwuid.c (revision 2021)
1*2021Swnj /* @(#)getpwuid.c	4.1 (Berkeley) 12/21/80 */
2*2021Swnj #include <pwd.h>
3*2021Swnj 
4*2021Swnj struct passwd *
5*2021Swnj getpwuid(uid)
6*2021Swnj register uid;
7*2021Swnj {
8*2021Swnj 	register struct passwd *p;
9*2021Swnj 	struct passwd *getpwent();
10*2021Swnj 
11*2021Swnj 	setpwent();
12*2021Swnj 	while( (p = getpwent()) && p->pw_uid != uid );
13*2021Swnj 	endpwent();
14*2021Swnj 	return(p);
15*2021Swnj }
16