NAME
getname - returns the string login id of the entry in the password
file whose numerical user id matches userid

SYNOPSIS
char *getname(userid)
int userid;

DESCRIPTION
getname searches through the password file for an entry whose
numerical user id matches the parameter userid.

getname continues searching until a match or the end of the
password file has been reached, building its own structure, names,
for storing the entries of the password file that were examined.

If getname is called repeatedly, names is checked first for an
entry matching userid. If none is found, entries from the password
file are entered names as before.

When the entire password file has been stored, only names will be
checked for an entry matching userid.

FILES
/etc/passwd The password file.

SEE ALSO
passwd(5), getpwent(3), login(1), crypt(3), group(5)

DIAGNOSTICS
getname returns the pointer NULL when there is no entry in the
password file corresponding to userid.