static char sccsid
[] = "@(#)getpwinfo.c 5.1 (Berkeley) %G%";
* guinfo(uid, name, path) get passwd file info for uid
* modified 3/16/81 to use the "real" login name -- mcnc!dennis
register char *path
, *name
;
register struct passwd
*pwd
;
struct passwd
*getpwuid(), *getpwnam();
if ((l
= getlogin()) != NULL
) {
if ((pwd
= getpwuid(uid
)) == NULL
) {
/* can not find uid in passwd file */
strcpy(path
, pwd
->pw_dir
);
strcpy(name
, pwd
->pw_name
);
* gninfo(name, uid, path) get passwd file info for name
register struct passwd
*pwd
;
struct passwd
*getpwnam();
if ((pwd
= getpwnam(name
)) == NULL
) {
/* can not find name in passwd file */
strcpy(path
, pwd
->pw_dir
);