/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ static char *Sccsid = "@(#)getpwuid.c 3.0 4/21/86"; /* * Based on * char *sccsid = "@(#)getpwuid.c 4.1 10/9/80"; */ #include <pwd.h> struct passwd * getpwuid(uid) register uid; { register struct passwd *p; struct passwd *getpwent(); setpwent(); while( (p = getpwent()) && p->pw_uid != uid ); endpwent(); return(p); }