version 1.8.6.1, 2003/07/29 15:08:30
|
version 1.13, 2003/11/05 04:10:42
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2003//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
System::getCurrentTime( sec, milliSec ); | System::getCurrentTime( sec, milliSec ); |
| |
srand( (int) sec ); | srand( (int) sec ); |
|
#ifdef PEGASUS_PLATFORM_SOLARIS_SPARC |
|
Unit32 seed; |
|
randNum = rand_r(*seed); |
|
#else |
randNum = rand(); | randNum = rand(); |
|
#endif |
| |
// | // |
// Make sure the random number generated is between 0-63. | // Make sure the random number generated is between 0-63. |
|
|
randNum >>= 6; | randNum >>= 6; |
*salt++ = _SALT_STRING[ randNum & 0x3f ]; | *salt++ = _SALT_STRING[ randNum & 0x3f ]; |
| |
salt[2] = '\0'; |
*salt = '\0'; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
|
|
_passwordTable.clear(); | _passwordTable.clear(); |
_passwordFile->load(_passwordTable); | _passwordFile->load(_passwordTable); |
} | } |
catch (CannotOpenFile cof) |
catch (CannotOpenFile&) |
{ | { |
_passwordTable.clear(); | _passwordTable.clear(); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw cof; |
throw; |
} | } |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
|
|
{ | { |
_mutex->timed_lock(_MUTEX_TIMEOUT, pegasus_thread_self()); | _mutex->timed_lock(_MUTEX_TIMEOUT, pegasus_thread_self()); |
} | } |
catch (TimeOut e) |
catch (TimeOut&) |
{ | { |
//l10n | //l10n |
//throw PEGASUS_CIM_EXCEPTION( CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION( CIM_ERR_FAILED, |
|
|
throw PEGASUS_CIM_EXCEPTION_L( CIM_ERR_FAILED, MessageLoaderParms("Security.UserManager.UserFileHandler.TIMEOUT", | throw PEGASUS_CIM_EXCEPTION_L( CIM_ERR_FAILED, MessageLoaderParms("Security.UserManager.UserFileHandler.TIMEOUT", |
"Timed out trying to perform requested operation.Please re-try the operation again.")); | "Timed out trying to perform requested operation.Please re-try the operation again.")); |
} | } |
catch (WaitFailed e) |
catch (WaitFailed&) |
{ | { |
//l10n | //l10n |
//throw PEGASUS_CIM_EXCEPTION( CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION( CIM_ERR_FAILED, |
|
|
throw PEGASUS_CIM_EXCEPTION_L( CIM_ERR_FAILED, MessageLoaderParms("Security.UserManager.UserFileHandler.TIMEOUT", | throw PEGASUS_CIM_EXCEPTION_L( CIM_ERR_FAILED, MessageLoaderParms("Security.UserManager.UserFileHandler.TIMEOUT", |
"Timed out trying to perform requested operation.Please re-try the operation again.")); | "Timed out trying to perform requested operation.Please re-try the operation again.")); |
} | } |
catch (Deadlock e) |
catch (Deadlock&) |
{ | { |
//l10n | //l10n |
//throw PEGASUS_CIM_EXCEPTION( CIM_ERR_FAILED, | //throw PEGASUS_CIM_EXCEPTION( CIM_ERR_FAILED, |