Returns information about the specified user name.
#include <pwd.h> int getpwnam_r ( const char *name, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result );
(IN) Points to a user name, obtained from such functions as getstat and fgetstat.
(IN) Points to a passwd structure which is updated with information about the specified user.
(IN) Points to a buffer to use for referenced strings.
(IN) Specifies the size of the buffer parameter, in bytes. Use sysconf to determine the maximum length of referenced strings.
(IN) Points to a NULL pointer if an error occurs or the entry cannot be found.
If successful, returns 0. Otherwise, returns an error code.
The getpwnam_r function is the preferred function for applications running in a multi-threaded, multi-processor environment.