user_from_uid()

get user name associated with user ID 

Function


SYNOPSIS

#include <pwd.h>

char *user_from_uid(uid_t uid, int nouser);


DESCRIPTION

The user_from_uid() function returns the user name associated with the argument uid. The user name is cached so that multiple calls with the same uid do not require additional calls to getpwuid(). If there is no user associated with the uid, a pointer is returned to an ASCII representation of the uid, unless the argument nouser is non-zero, in which case a NULL pointer is returned.


PARAMETERS

uid 

Is the user ID for which the user name is to be obtained.

nouser 

Indicates what to do in case uid does not correspond to a user name.


RETURN VALUES

Returns the user name corresponding to uid, the ASCII representation of uid, or NULL.


CONFORMANCE

4.4BSD.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
getpwuid()


PTC MKS Toolkit 10.5 Documentation Build 40.