/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ /* * SCCSID: @(#)getpwnam.c 3.0 4/22/86 */ #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); }