4 #ifndef RUDIMENTS_PASSWDENTRY_H
5 #define RUDIMENTS_PASSWDENTRY_H
7 #include <rudiments/private/passwdentryincludes.h>
9 #ifdef RUDIMENTS_NAMESPACE
13 class passwdentryprivate;
25 static bool getName(uid_t userid,
char **name);
32 static bool getPassword(uid_t userid,
char **password);
38 static bool getPrimaryGroupId(uid_t userid, gid_t *groupid);
45 static bool getRealName(uid_t userid,
char **realname);
53 static bool getHomeDirectory(uid_t userid,
char **homedir);
61 static bool getShell(uid_t userid,
char **shell);
69 static bool getPassword(
const char *username,
75 static bool getUserId(
const char *username,
82 static bool getPrimaryGroupId(
const char *username,
90 static bool getRealName(
const char *username,
99 static bool getHomeDirectory(
const char *username,
108 static bool getShell(
const char *username,
127 bool initialize(
const char *username);
131 bool initialize(uid_t userid);
134 const char *getName()
const;
137 const char *getPassword()
const;
140 uid_t getUserId()
const;
143 gid_t getPrimaryGroupId()
const;
146 const char *getRealName()
const;
149 const char *getHomeDirectory()
const;
152 const char *getShell()
const;
159 static bool needsMutex();
164 static void setMutex(
mutex *mtx);
166 #include <rudiments/private/passwdentry.h>
169 #ifdef RUDIMENTS_NAMESPACE