Return to getname.c CVS log | Up to [local] / src / usr.bin / mail |
version 1.2, 1996/06/11 12:53:40 | version 1.3, 1997/07/13 21:21:13 | ||
---|---|---|---|
|
|
||
struct passwd *pw; | struct passwd *pw; | ||
if ((pw = getpwuid(uid)) == NULL) | if ((pw = getpwuid(uid)) == NULL) | ||
return NOSTR; | return(NOSTR); | ||
return pw->pw_name; | return(pw->pw_name); | ||
} | } | ||
/* | /* | ||
|
|
||
struct passwd *pw; | struct passwd *pw; | ||
if ((pw = getpwnam(name)) == NULL) | if ((pw = getpwnam(name)) == NULL) | ||
return -1; | return(-1); | ||
return pw->pw_uid; | return(pw->pw_uid); | ||
} | } |