xref: /original-bsd/lib/libc/gen/getpwuid.c (revision bff54947)
1 #ifndef lint
2 static char sccsid[] = "@(#)getpwuid.c	5.1 (Berkeley) 06/05/85";
3 #endif not lint
4 
5 #include <pwd.h>
6 
7 struct passwd *
8 getpwuid(uid)
9 register uid;
10 {
11 	register struct passwd *p;
12 	struct passwd *getpwent();
13 
14 	setpwent();
15 	while( (p = getpwent()) && p->pw_uid != uid );
16 	endpwent();
17 	return(p);
18 }
19