OW_NAMESPACE::UserUtils Namespace Reference

Facade encapsulating OS specific user functionality. More...


Typedefs

typedef uid_t UserID

Functions

String getEffectiveUserId ()
 Get the effective user id.
String getCurrentUserName ()
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

Mutex g_getpwMutex
const UserID INVALID_USERID = ~0


Detailed Description

Facade encapsulating OS specific user functionality.

Typedef Documentation

typedef uid_t OW_NAMESPACE::UserUtils::UserID
 

Definition at line 49 of file OW_UserUtils.hpp.


Function Documentation

String OW_NAMESPACE::UserUtils::getCurrentUserName  ) 
 

Definition at line 77 of file OW_UserUtils.cpp.

References getUserName().

String OW_NAMESPACE::UserUtils::getEffectiveUserId  ) 
 

Get the effective user id.

On POSIX platforms this calls geteuid().

Definition at line 62 of file OW_UserUtils.cpp.

Referenced by OW_NAMESPACE::HTTPClient::sendAuthorization().

UserID OW_NAMESPACE::UserUtils::getUserId const String &  userName,
bool &  validUserName
 

Convert a textual username into a platform native user type.

Parameters:
userName The user name to convert.
validUserName Out param set to true if the conversion was successful, false otherwise.
Returns:
The user id corresponding to userName.

Definition at line 146 of file OW_UserUtils.cpp.

References OW_NAMESPACE::String::c_str(), g_getpwMutex, INVALID_USERID, and result.

Referenced by OW_NAMESPACE::BinaryRequestHandler::doProcess().

String OW_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 93 of file OW_UserUtils.cpp.

References g_getpwMutex, name, and result.

Referenced by getCurrentUserName().


Variable Documentation

Mutex OW_NAMESPACE::UserUtils::g_getpwMutex [static]
 

Definition at line 89 of file OW_UserUtils.cpp.

Referenced by getUserId(), and getUserName().

const UserID OW_NAMESPACE::UserUtils::INVALID_USERID = ~0
 

Definition at line 50 of file OW_UserUtils.hpp.

Referenced by getUserId().


Generated on Thu Feb 9 09:18:00 2006 for openwbem by  doxygen 1.4.6