Typedefs | |
| typedef uid_t | UserID |
Functions | |
| String | getEffectiveUserId () |
| Get the effective user id. | |
| String | getCurrentUserName () |
| long | getSysconfValue (int name, long default_value, int &error) |
| long | getSysconfValue (int name, long default_value) |
| String | getUserName (UserID uid, bool &success) |
| If the username is invalid, or if getUserName() fails for any other reason, 'success' will be set to false. | |
| UserID | getUserId (const String &userName, bool &validUserName) |
| Convert a textual username into a platform native user type. | |
Variables | |
| GlobalMutex | g_getpwMutex = { 0 , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| const UserID | INVALID_USERID = UserID(~0) |
| typedef uid_t BLOCXX_NAMESPACE::UserUtils::UserID |
Definition at line 56 of file UserUtils.hpp.
| String BLOCXX_NAMESPACE::UserUtils::getCurrentUserName | ( | ) |
| String BLOCXX_NAMESPACE::UserUtils::getEffectiveUserId | ( | ) |
Get the effective user id.
On POSIX platforms this calls geteuid().
Definition at line 91 of file UserUtils.cpp.
| long BLOCXX_NAMESPACE::UserUtils::@297::getSysconfValue | ( | int | name, | |
| long | default_value | |||
| ) | [static] |
| long BLOCXX_NAMESPACE::UserUtils::@297::getSysconfValue | ( | int | name, | |
| long | default_value, | |||
| int & | error | |||
| ) | [static] |
Definition at line 168 of file UserUtils.cpp.
Referenced by getSysconfValue(), getUserId(), and getUserName().
| UserID BLOCXX_NAMESPACE::UserUtils::getUserId | ( | const String & | userName, | |
| bool & | validUserName | |||
| ) |
Convert a textual username into a platform native user type.
| userName | The user name to convert. | |
| validUserName | Out param set to true if the conversion was successful, false otherwise. |
Definition at line 266 of file UserUtils.cpp.
References BLOCXX_NAMESPACE::String::c_str(), g_getpwMutex, getSysconfValue(), and INVALID_USERID.
| String BLOCXX_NAMESPACE::UserUtils::getUserName | ( | UserID | uid, | |
| bool & | success | |||
| ) |
If the username is invalid, or if getUserName() fails for any other reason, 'success' will be set to false.
On success, 'success' is set to true.
Definition at line 209 of file UserUtils.cpp.
References g_getpwMutex, and getSysconfValue().
Referenced by getCurrentUserName(), and BLOCXX_NAMESPACE::logFileStatus().
GlobalMutex BLOCXX_NAMESPACE::UserUtils::g_getpwMutex = { 0 , 0, {0, PTHREAD_MUTEX_INITIALIZER} } [static] |
| const UserID BLOCXX_NAMESPACE::UserUtils::INVALID_USERID = UserID(~0) |
1.5.6