Get the next entry from the password database
#include <sys/types.h> #include <pwd.h> int getpwent_r( struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result);
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The getpwent_r() function returns the next entry from the password database. It's similar to getpwent(), but getpwent_r() is reentrant.
0 on success or if the entry couldn't be found, or nonzero if an error occurred:
The getpwent_r() function can also return any error code that the following functions indicate:
POSIX 1003.1 TSF
endpwent(), getgrent(), getlogin(), getpwent(), getpwnam_r(), getpwuid_r(), setpwent()