version 1.25.30.1, 2006/12/28 03:57:04
|
version 1.25.30.2, 2007/01/02 06:14:47
|
|
|
#include <Pegasus/Common/FileSystem.h> | #include <Pegasus/Common/FileSystem.h> |
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
#include <Pegasus/ExecutorClient/ExecutorClient.h> |
#include <Pegasus/Common/Executor.h> |
#if defined(PEGASUS_OS_OS400) | #if defined(PEGASUS_OS_OS400) |
#include "OS400ConvertChar.h" | #include "OS400ConvertChar.h" |
#endif | #endif |
|
|
{ | { |
if (FileSystem::exists(_passwordFile)) | if (FileSystem::exists(_passwordFile)) |
{ | { |
if (ExecutorClient::removeFile(_passwordFile.getCString()) != 0) |
if (Executor::removeFile(_passwordFile.getCString()) != 0) |
{ | { |
throw CannotRemoveFile(_passwordFile); | throw CannotRemoveFile(_passwordFile); |
} | } |
|
|
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 (ExecutorClient::renameFile( |
if (Executor::renameFile( |
_passwordBackupFile.getCString(), _passwordFile.getCString()) != 0) | _passwordBackupFile.getCString(), _passwordFile.getCString()) != 0) |
{ | { |
//l10n | //l10n |
|
|
{ | { |
if ( FileSystem::exists(_passwordFile)) | if ( FileSystem::exists(_passwordFile)) |
{ | { |
if (ExecutorClient::removeFile(_passwordFile.getCString()) != 0) |
if (Executor::removeFile(_passwordFile.getCString()) != 0) |
{ | { |
//l10n | //l10n |
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, | //Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
|
|
{ | { |
if ( FileSystem::exists(_passwordFile)) | if ( FileSystem::exists(_passwordFile)) |
{ | { |
if (ExecutorClient::renameFile(_passwordFile.getCString(), |
if (Executor::renameFile(_passwordFile.getCString(), |
_passwordBackupFile.getCString()) != 0) | _passwordBackupFile.getCString()) != 0) |
{ | { |
//l10n | //l10n |
|
|
// Open the password file for writing | // Open the password file for writing |
// | // |
| |
FILE* ofs = ExecutorClient::openFile(_passwordFile.getCString(), 'w'); |
FILE* ofs = Executor::openFile(_passwordFile.getCString(), 'w'); |
| |
if (!ofs) | if (!ofs) |
{ | { |
|
|
| |
if ( FileSystem::exists(_passwordBackupFile)) | if ( FileSystem::exists(_passwordBackupFile)) |
{ | { |
if (ExecutorClient::removeFile(_passwordBackupFile.getCString()) != 0) |
if (Executor::removeFile(_passwordBackupFile.getCString()) != 0) |
{ | { |
//l10n | //l10n |
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, | //Logger::put(Logger::ERROR_LOG, System::CIMSERVER, |