Commit | Line | Data |
---|---|---|
1 | #ifndef lint | |
2 | static char sccsid[] = "@(#)getpwnam.c 5.1 (Berkeley) %G%"; | |
3 | #endif not lint | |
4 | ||
5 | #include <pwd.h> | |
6 | ||
7 | struct passwd * | |
8 | getpwnam(name) | |
9 | char *name; | |
10 | { | |
11 | register struct passwd *p; | |
12 | struct passwd *getpwent(); | |
13 | ||
14 | setpwent(); | |
15 | while( (p = getpwent()) && strcmp(name,p->pw_name) ); | |
16 | endpwent(); | |
17 | return(p); | |
18 | } |