42 #ifndef _DWMPASSWORD_HH_ 43 #define _DWMPASSWORD_HH_ 46 #include <sys/types.h> 67 Password(
const std::string & userName);
77 void Set(
const struct passwd & passwdStruct);
82 const std::string &
UserName()
const;
102 const std::string &
Gecos()
const;
112 const std::string &
Shell()
const;
117 friend std::ostream &
operator << (std::ostream & os,
121 std::string _userName;
122 std::string _encryptedPassword;
126 std::string _homeDirectory;
129 static std::mutex _mutex;
134 #endif // _DWMPASSWORD_HH_ const std::string & HomeDirectory() const
Returns the home directory.
Encapsulates an /etc/passwd entry.
Definition: DwmPassword.hh:61
void Set(const struct passwd &passwdStruct)
Use the contents of passwdStruct to fill all of our members.
uid_t UserId() const
Returns the user ID.
gid_t GroupId() const
Returns the group ID.
Password(const std::string &userName)
Construct from a user name.
Definition: DwmBZ2IO.hh:67
const std::string & Shell() const
Returns the shell.
const std::string & UserName() const
Returns the user name.
const std::string & Gecos() const
Returns the gecos.
friend std::ostream & operator<<(std::ostream &os, const Password &password)
Prints to an ostream in /etc/passwd format.
const std::string & EncryptedPassword() const
Returns the user password.