version 1.9.14.1, 2006/07/27 23:12:11
|
version 1.12, 2008/02/27 20:28:19
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Sushma Fernandes, Hewlett Packard Company (sushma_fernandes@hp.com) |
|
// |
|
// Modified By: |
|
// Amit K Arora, IBM (amita@in.ibm.com) for PEP#101 |
|
// |
|
//%//////////////////////////////////////////////////////////////////////////// | //%//////////////////////////////////////////////////////////////////////////// |
| |
| |
|
|
| |
// | // |
// Flag to indicate whether password file exists | // Flag to indicate whether password file exists |
|
// |
Boolean _passwordFileExists; | Boolean _passwordFileExists; |
| |
// | // |
|
|
// | // |
// Instance of the PasswordFile | // Instance of the PasswordFile |
// | // |
AutoPtr<PasswordFile> _passwordFile; //PEP101 |
AutoPtr<PasswordFile> _passwordFile; |
| |
// | // |
// Mutex variable for consistent Password File and cache updates | // Mutex variable for consistent Password File and cache updates |
// | // |
AutoPtr<Mutex> _mutex; //PEP101 |
AutoPtr<Mutex> _mutex; |
| |
/** | /** |
generate random salt key for password encryption |
Generate random salt key for password encryption |
| |
@param salt A array of 3 characters | @param salt A array of 3 characters |
*/ | */ |
|
|
/** | /** |
Load the user information from the password file. | Load the user information from the password file. |
| |
@exception PasswordFileSyntaxError if password file contains a syntax error. |
@exception PasswordFileSyntaxError if password file contains a syntax |
|
error. |
@exception CannotRenameFile if password file cannot be renamed. | @exception CannotRenameFile if password file cannot be renamed. |
*/ | */ |
void _loadAllUsers (); | void _loadAllUsers (); |
|
|
/** Destructor. */ | /** Destructor. */ |
~UserFileHandler(); | ~UserFileHandler(); |
| |
|
|
/** | /** |
Add user entry to file | Add user entry to file |
| |
|
|
password hashtable | password hashtable |
@exception CannotRenameFile if password file cannot be renamed. | @exception CannotRenameFile if password file cannot be renamed. |
*/ | */ |
void addUserEntry(const String& userName, const String& passWord); |
void addUserEntry( |
|
const String& userName, |
|
const String& password); |
| |
/** | /** |
Modify user entry in file | Modify user entry in file |
|
|
*/ | */ |
void removeUserEntry(const String& userName); | void removeUserEntry(const String& userName); |
| |
|
|
/** | /** |
Get a list of all the user names. | Get a list of all the user names. |
| |
|
|
| |
@param userName Name of the user to be verified | @param userName Name of the user to be verified |
@param password password to be verified | @param password password to be verified |
@return true if the user's password matches existing password, else false |
@return true if the user's password matches existing password, else |
|
false |
| |
@exception FileNotReadable if unable to read password file | @exception FileNotReadable if unable to read password file |
@exception InvalidUser if the specified user does not exist | @exception InvalidUser if the specified user does not exist |