![]() |
Scanframe Modular Application 0.1.0
|
Extends struct passwd and auto allocates needed memory. Used as a result type with auto memory cleanup . More...
#include <lnx_utils.h>
Public Member Functions | |
passwd_t () | |
~passwd_t () | |
operator bool () const | |
Friends | |
bool | proc_getpwnam (std::string name, passwd_t &pwd) |
bool | proc_getpwuid (uid_t uid, passwd_t &pwd) |
Extends struct passwd and auto allocates needed memory. Used as a result type with auto memory cleanup .
sf::passwd_t::passwd_t | ( | ) |
Constructor allocating the right amount of memory.
sf::passwd_t::~passwd_t | ( | ) |
Destructor
|
inlineexplicit |
|
friend |
Wrapper for getpwnam_r() but simplified using passwd_t. Returns true when an entry was found. In case of an error it throws en exception.
|
friend |
Wrapper for getpwuid_r() but simplified using passwd_t. Returns true when an entry was found. In case of an error it throws en exception.