#include <pwd.h> const char *
user_from_uid (uid_t uid int nouser);
#include <grp.h> const char *
group_from_gid (gid_t gid int nogroup);
DESCRIPTION
The
user_from_uid ();
function returns the user name associated with the argument
Fa uid .
The user name is cached so that multiple calls with the same
Fa uid
do not require additional calls to
getpwuid(3).
If there is no user associated with the
Fa uid ,
a pointer is returned
to a string representation of the
Fa uid ,
unless the argument
Fa nouser
is non-zero, in which case a
NULL
pointer is returned.
The
group_from_gid ();
function returns the group name associated with the argument
Fa gid .
The group name is cached so that multiple calls with the same
Fa gid
do not require additional calls to
getgrgid(3).
If there is no group associated with the
Fa gid ,
a pointer is returned
to a string representation of the
Fa gid ,
unless the argument
Fa nogroup
is non-zero, in which case a
NULL
pointer is returned.