Rudiments
userentry.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_USERENTRY_H
5 #define RUDIMENTS_USERENTRY_H
6 
7 #include <rudiments/private/userentryincludes.h>
8 
11 class RUDIMENTS_DLLSPEC userentry {
12  public:
13 
16 
19  userentry(const userentry &u);
20 
24 
27 
30  bool initialize(const char *username);
31 
34  bool initialize(uid_t userid);
35 
37  const char *getName() const;
38 
40  const char *getPassword() const;
41 
52  uid_t getUserId() const;
53 
61  const char *getSidString() const;
62 
70  const void *getSid() const;
71 
74  uint64_t getSidSize() const;
75 
77  gid_t getPrimaryGroupId() const;
78 
80  const char *getRealName() const;
81 
83  const char *getHomeDirectory() const;
84 
86  const char *getShell() const;
87 
89  const char *getEncryptedPassword() const;
90 
94  long getLastChangeDate() const;
95 
98  int32_t getDaysBeforeChangeAllowed() const;
99 
103 
107 
110  int32_t getDaysOfInactivityAllowed() const;
111 
114  int32_t getExpirationDate() const;
115 
117  int32_t getFlag() const;
118 
119 
128  static char *getName(uid_t userid);
129 
136  static uid_t getUserId(const char *username);
137 
148  static char *getSidString(const char *username);
149 
156 
159  static bool needsMutex();
160 
164  static void setMutex(threadmutex *mtx);
165 
166  #include <rudiments/private/userentry.h>
167 };
168 
169 #endif
Definition: threadmutex.h:11
Definition: userentry.h:11
uint64_t getSidSize() const
bool initialize(uid_t userid)
static uid_t getUserId(const char *username)
const void * getSid() const
uid_t getUserId() const
userentry & operator=(const userentry &u)
const char * getEncryptedPassword() const
const char * getShell() const
const char * getName() const
const char * getHomeDirectory() const
gid_t getPrimaryGroupId() const
int32_t getDaysBeforeExpirationWarning() const
const char * getSidString() const
const char * getRealName() const
static char * getSidString(const char *username)
int32_t getExpirationDate() const
static void setMutex(threadmutex *mtx)
static char * getName(uid_t userid)
int32_t getDaysOfInactivityAllowed() const
long getLastChangeDate() const
static bool platformSupportsFormalSid()
int32_t getDaysBeforeChangeRequired() const
static bool needsMutex()
bool initialize(const char *username)
userentry(const userentry &u)
int32_t getDaysBeforeChangeAllowed() const
int32_t getFlag() const
const char * getPassword() const