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