version 1.3, 1997/07/13 21:21:13 |
version 1.4, 1997/07/14 00:24:27 |
|
|
/* Getname / getuserid for those with hashed passwd data base). */ |
/* Getname / getuserid for those with hashed passwd data base). */ |
|
|
/* |
/* |
* Search the passwd file for a uid. Return name on success, NOSTR on failure |
* Search the passwd file for a uid. Return name on success, NULL on failure |
*/ |
*/ |
char * |
char * |
getname(uid) |
getname(uid) |
|
|
struct passwd *pw; |
struct passwd *pw; |
|
|
if ((pw = getpwuid(uid)) == NULL) |
if ((pw = getpwuid(uid)) == NULL) |
return(NOSTR); |
return(NULL); |
return(pw->pw_name); |
return(pw->pw_name); |
} |
} |
|
|