ldas-tools-al
2.6.6
|
Cache system information about users. More...
#include <UserInfoCache.hh>
Classes | |
class | UserInfo |
Class to manage information about a single user. More... | |
Public Member Functions | |
~UserInfoCache () | |
Destructor to release system resources. More... | |
~UserInfoCache () | |
Destructor to release system resources. More... | |
~UserInfoCache () | |
Destructor to release system resources. More... | |
Static Public Member Functions | |
static const UserInfo & | UID (UserInfo::uid_type Id) |
Locate an entry based on the identification number of the user. More... | |
static const UserInfo & | Name (const std::string &Name) |
Locate an entry based on the system name of the user. More... | |
static const UserInfo & | UID (UserInfo::uid_type Id) |
Locate an entry based on the identification number of the user. More... | |
static const UserInfo & | Name (const std::string &Name) |
Locate an entry based on the system name of the user. More... | |
static const UserInfo & | UID (UserInfo::uid_type Id) |
Locate an entry based on the identification number of the user. More... | |
static const UserInfo & | Name (const std::string &Name) |
Locate an entry based on the system name of the user. More... | |
Private Types | |
typedef LDASTools::AL::unordered_map< INT_4U, UserInfo > | cache_type |
Container to hold cached infomation. More... | |
typedef LDASTools::AL::unordered_map< std::string, INT_4U > | name_mapping_type |
Container to hold mapping from system name to uid. More... | |
typedef LDASTools::AL::unordered_map< INT_4U, UserInfo > | cache_type |
Container to hold cached infomation. More... | |
typedef LDASTools::AL::unordered_map< std::string, INT_4U > | name_mapping_type |
Container to hold mapping from system name to uid. More... | |
typedef LDASTools::AL::unordered_map< INT_4U, UserInfo > | cache_type |
Container to hold cached infomation. More... | |
typedef LDASTools::AL::unordered_map< std::string, INT_4U > | name_mapping_type |
Container to hold mapping from system name to uid. More... | |
Private Member Functions | |
SINGLETON_TS_DECL (UserInfoCache) | |
const UserInfo & | create (UserInfo::uid_type Id) |
Create new entry. More... | |
bool | init () |
Initiazation routine. More... | |
const UserInfo & | uid (UserInfo::uid_type Id) |
Return the user identifier. More... | |
SINGLETON_TS_DECL (UserInfoCache) | |
const UserInfo & | create (UserInfo::uid_type Id) |
Create new entry. More... | |
bool | init () |
Initiazation routine. More... | |
const UserInfo & | uid (UserInfo::uid_type Id) |
Return the user identifier. More... | |
SINGLETON_TS_DECL (UserInfoCache) | |
const UserInfo & | create (UserInfo::uid_type Id) |
Create new entry. More... | |
bool | init () |
Initiazation routine. More... | |
const UserInfo & | uid (UserInfo::uid_type Id) |
Return the user identifier. More... | |
Private Attributes | |
cache_type | m_cache |
Storage for the cache. More... | |
name_mapping_type | m_names |
Storage for the map between system name and uid. More... | |
MutexLock::baton_type | m_baton |
Baton to control access. More... | |
Cache system information about users.
The information stored within this class contains information about the users that have access to current machine.
|
private |
Container to hold cached infomation.
|
private |
Container to hold cached infomation.
|
private |
Container to hold cached infomation.
|
private |
Container to hold mapping from system name to uid.
|
private |
Container to hold mapping from system name to uid.
|
private |
Container to hold mapping from system name to uid.
LDASTools::AL::UserInfoCache::~UserInfoCache | ( | ) |
Destructor to release system resources.
Release resource associated with this object
LDASTools::AL::UserInfoCache::~UserInfoCache | ( | ) |
Destructor to release system resources.
LDASTools::AL::UserInfoCache::~UserInfoCache | ( | ) |
Destructor to release system resources.
|
private |
Create new entry.
Look up a user in the password database and cache the information to prevent excessive use of system calls. If the user id cannot be found in the password database, an entry is created with the user name being the string representation of the user id.
|
private |
Create new entry.
|
private |
Create new entry.
|
private |
Initiazation routine.
|
private |
Initiazation routine.
|
private |
Initiazation routine.
|
static |
Locate an entry based on the system name of the user.
|
static |
Locate an entry based on the system name of the user.
|
static |
Locate an entry based on the system name of the user.
|
private |
|
private |
|
private |
|
inlinestatic |
Locate an entry based on the identification number of the user.
Supply the caller with the full set of information known about the user assoicated with the giver user identification number.
|
private |
Return the user identifier.
|
static |
Locate an entry based on the identification number of the user.
|
private |
Return the user identifier.
|
static |
Locate an entry based on the identification number of the user.
|
private |
Return the user identifier.
|
private |
Baton to control access.
|
private |
Storage for the cache.
|
private |
Storage for the map between system name and uid.