version 1.28, 2007/06/05 10:11:04
|
version 1.29, 2007/06/29 17:43:16
|
|
|
// | // |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
| |
|
|
|
|
/** | /** |
Constructor. | Constructor. |
*/ | */ |
|
|
} | } |
catch(const NoSuchFile&) | catch(const NoSuchFile&) |
{ | { |
//l10n |
|
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
|
//"Password file not found : $0.", _passwordFile); |
|
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
//"Creating blank password file."); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, | Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
"Security.UserManager.PasswordFile.PWD_FILE_NOT_FOUND", | "Security.UserManager.PasswordFile.PWD_FILE_NOT_FOUND", |
"Password file not found : $0.", _passwordFile); | "Password file not found : $0.", _passwordFile); |
|
|
throw CannotRemoveFile(_passwordFile); | throw CannotRemoveFile(_passwordFile); |
} | } |
} | } |
//l10n |
|
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
//"Trying to use the backup file : $0.", _passwordBackupFile); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, | Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
"Security.UserManager.PasswordFile.TRYING_TO_BACKUP_FILE", | "Security.UserManager.PasswordFile.TRYING_TO_BACKUP_FILE", |
"Trying to use the backup file : $0.", _passwordBackupFile); | "Trying to use the backup file : $0.", _passwordBackupFile); |
if (Executor::renameFile( | if (Executor::renameFile( |
_passwordBackupFile.getCString(), _passwordFile.getCString()) != 0) |
_passwordBackupFile.getCString(), |
|
_passwordFile.getCString()) != 0) |
{ | { |
//l10n |
Logger::put_l( |
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
//"Unable to use the backup file : $0.", _passwordBackupFile); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
"Security.UserManager.PasswordFile.CANNOT_USE_BACKUP_FILE", | "Security.UserManager.PasswordFile.CANNOT_USE_BACKUP_FILE", |
"Unable to use the backup file : $0.", _passwordBackupFile); | "Unable to use the backup file : $0.", _passwordBackupFile); |
throw CannotRenameFile(_passwordBackupFile); | throw CannotRenameFile(_passwordBackupFile); |
} | } |
//l10n |
|
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
//"Recovered using the backup file : $0.", _passwordBackupFile); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, | Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
"Security.UserManager.PasswordFile.RECOVERED_USING_BACKUP_FILE", | "Security.UserManager.PasswordFile.RECOVERED_USING_BACKUP_FILE", |
"Recovered using the backup file : $0.", _passwordBackupFile); | "Recovered using the backup file : $0.", _passwordBackupFile); |
|
|
| |
if (!ifs) | if (!ifs) |
{ | { |
//l10n |
|
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
|
//"Error opening password file : $0.", _passwordFile); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, | Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
"Security.UserManager.PasswordFile.ERROR_OPENING_PWD_FILE", | "Security.UserManager.PasswordFile.ERROR_OPENING_PWD_FILE", |
"Error opening password file : $0.", _passwordFile); | "Error opening password file : $0.", _passwordFile); |
|
|
// | // |
if (*p != COLON) | if (*p != COLON) |
{ | { |
// |
|
// Did not find Colon, log a message and skip entry | // Did not find Colon, log a message and skip entry |
//l10n |
Logger::put_l( |
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
//"Error in reading password entry for : $0.", userName); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
"Security.UserManager.PasswordFile.ERROR_READING_PWD_ENTRY", | "Security.UserManager.PasswordFile.ERROR_READING_PWD_ENTRY", |
"Error in reading password entry for : $0.", userName); |
"Error in reading password entry for : $0.", |
|
userName); |
continue; | continue; |
} | } |
| |
|
|
// | // |
// Duplicate entry for user, ignore the new entry. | // Duplicate entry for user, ignore the new entry. |
// | // |
//l10n |
Logger::put_l( |
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
//"Duplicate user: $0.", userName); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
"Security.UserManager.PasswordFile.DUPLICATE_USER", | "Security.UserManager.PasswordFile.DUPLICATE_USER", |
"Duplicate user: $0.", userName); | "Duplicate user: $0.", userName); |
} | } |
|
|
{ | { |
if (Executor::removeFile(_passwordFile.getCString()) != 0) | if (Executor::removeFile(_passwordFile.getCString()) != 0) |
{ | { |
//l10n |
Logger::put_l( |
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
//"Cannot remove password file : $0.", _passwordFile); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
|
"Security.UserManager.PasswordFile.CANNOT_REMOVE_PWD_FILE", | "Security.UserManager.PasswordFile.CANNOT_REMOVE_PWD_FILE", |
"Cannot remove password file : $0.", _passwordFile); | "Cannot remove password file : $0.", _passwordFile); |
throw CannotRemoveFile(_passwordFile); | throw CannotRemoveFile(_passwordFile); |
|
|
if (Executor::renameFile(_passwordFile.getCString(), | if (Executor::renameFile(_passwordFile.getCString(), |
_passwordBackupFile.getCString()) != 0) | _passwordBackupFile.getCString()) != 0) |
{ | { |
//l10n |
Logger::put_l( |
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
//"Cannot rename password file : $0.", _passwordFile); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
|
"Security.UserManager.PasswordFile.CANNOT_RENAME_PWD_FILE", | "Security.UserManager.PasswordFile.CANNOT_RENAME_PWD_FILE", |
"Cannot rename password file : $0.", _passwordFile); |
"Cannot rename password file : $0.", |
|
_passwordFile); |
throw CannotRenameFile(_passwordFile); | throw CannotRenameFile(_passwordFile); |
} | } |
} | } |
|
|
{ | { |
if (Executor::removeFile(_passwordBackupFile.getCString()) != 0) | if (Executor::removeFile(_passwordBackupFile.getCString()) != 0) |
{ | { |
//l10n |
|
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, |
|
//Logger::SEVERE, |
|
// "Cannot remove backup password file : $0.", |
|
//_passwordBackupFile); |
|
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, | Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
"Security.UserManager.PasswordFile.CANNOT_REMOVE_BACKUP_PWD_FILE", |
"Security.UserManager.PasswordFile." |
"Cannot remove backup password file : $0.", _passwordBackupFile); |
"CANNOT_REMOVE_BACKUP_PWD_FILE", |
|
"Cannot remove backup password file : $0.", |
|
_passwordBackupFile); |
throw CannotRemoveFile(_passwordBackupFile); | throw CannotRemoveFile(_passwordBackupFile); |
} | } |
} | } |
|
|
} | } |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
|
|