Rudiments

- Main Page
- Classes

userentry.h
1 // Copyright (c) 2002-2014 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
9 class userentryprivate;
10
13 class RUDIMENTS_DLLSPEC userentry {
14 public:
15
17 userentry();
18
21 userentry(const userentry &u);
22
25 userentry &operator=(const userentry &u);
26
28 ~userentry();
29
32 bool initialize(const char *username);
33
36 bool initialize(uid_t userid);
37
39 const char *getName() const;
40
42 const char *getPassword() const;
43
54 uid_t getUserId() const;
55
63 const char *getSidString() const;
64
72 const void *getSid() const;
73
76 uint64_t getSidSize() const;
77
79 gid_t getPrimaryGroupId() const;
80
82 const char *getRealName() const;
83
85 const char *getHomeDirectory() const;
86
88 const char *getShell() const;
89
91 const char *getEncryptedPassword() const;
92
96 long getLastChangeDate() const;
97
100 int32_t getDaysBeforeChangeAllowed() const;
101
104 int32_t getDaysBeforeChangeRequired() const;
105
108 int32_t getDaysBeforeExpirationWarning() const;
109
112 int32_t getDaysOfInactivityAllowed() const;
113
116 int32_t getExpirationDate() const;
117
119 int32_t getFlag() const;
120
121
130 static char *getName(uid_t userid);
131
138 static uid_t getUserId(const char *username);
139
150 static char *getSidString(const char *username);
151
157 static bool platformSupportsFormalSid();
158
161 static bool needsMutex();
162
166 static void setMutex(threadmutex *mtx);
167
168 #include <rudiments/private/userentry.h>
169 };
170
171 #endif
threadmutex
Definition: threadmutex.h:13
userentry
Definition: userentry.h:13