This commit is contained in:
@@ -381,7 +381,7 @@ HMODULE libtmp = NULL;
|
||||
|
||||
if( !libtmp )
|
||||
{
|
||||
PrintMessage(MESG_ERROR, "\n\n LoadLibrary : Failed to load library %s ", loadPath);
|
||||
PrintMessage(MESG_DEBUG, "\n\n LoadLibrary : Failed to load library %s ", loadPath);
|
||||
free(loadPath);
|
||||
return 0;
|
||||
}
|
||||
@@ -454,7 +454,7 @@ int ProfileManager::ProfileInit(char *profileName)
|
||||
|
||||
if( !libnss || !libplc )
|
||||
{
|
||||
PrintMessage(MESG_ERROR, "\n ProfileInit : Failed to load the required library from directory %s", libraryPath);
|
||||
PrintMessage(MESG_ERROR, "\n ProfileInit : Failed to load the required firefox library");
|
||||
return FPM_LIBRARY_LOAD_FAILED;
|
||||
}
|
||||
|
||||
@@ -543,16 +543,40 @@ int ProfileManager::ProfileInit(char *profileName)
|
||||
|
||||
void ProfileManager::ProfileExit()
|
||||
{
|
||||
int i;
|
||||
|
||||
PrintMessage(MESG_DEBUG, "\n ProfileExit : Shutting down the profile %s", profileName);
|
||||
|
||||
if( (isInitialized == FPM_TRUE) && NSSShutdown != NULL )
|
||||
(*NSSShutdown)();
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n ProfileExit : invoking NSSShutdown for profile", profileName);
|
||||
for(i=0; (i<5) && ((*NSSShutdown)() == SECFailure); i++ )
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n ProfileExit %d: NSSShutdown : FAILURE",i);
|
||||
//Sleep(500);
|
||||
}
|
||||
|
||||
if( i != 5)
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n ProfileExit :NSSShutdown : SUCCESS");
|
||||
|
||||
}
|
||||
else
|
||||
PrintMessage(MESG_DEBUG, "\n ProfileExit : NSSShutdown : FAILURE");
|
||||
|
||||
}
|
||||
|
||||
if( libnss != NULL )
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n ProfileExit : Freeing library libnss.dll");
|
||||
FREELIBRARY(libnss);
|
||||
}
|
||||
|
||||
if( libplc != NULL )
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n ProfileExit : Freeing library libplc.dll");
|
||||
FREELIBRARY(libplc);
|
||||
}
|
||||
|
||||
// clean up signon data...
|
||||
signonManager.RemoveSignonData();
|
||||
@@ -569,6 +593,7 @@ int ProfileManager::IsMasterPasswordSet()
|
||||
{
|
||||
PK11SlotInfo *slot = 0;
|
||||
int retValue = 0;
|
||||
SECStatus status;
|
||||
|
||||
slot = (*PK11GetInternalKeySlot)();
|
||||
|
||||
@@ -581,16 +606,23 @@ int retValue = 0;
|
||||
PrintMessage(MESG_DEBUG, "\n PK11_GetInternalKeySlot SUCCESS ...");
|
||||
|
||||
// Check with empty password....If it succeeds then master password is not set
|
||||
if( (*PK11CheckUserPassword)(slot,"") == SECSuccess )
|
||||
|
||||
status = (*PK11CheckUserPassword)(slot,"");
|
||||
if( status == SECSuccess )
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n IsMasterPasswordSet : Master password is not set...");
|
||||
retValue = FPM_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n IsMasterPasswordSet : Master password is set...");
|
||||
retValue = FPM_TRUE;
|
||||
}
|
||||
else if(status == SECWouldBlock ) // password is wrong
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n IsMasterPasswordSet : Master password is set...");
|
||||
retValue = FPM_TRUE;
|
||||
}
|
||||
else // something is wrong, may be key3.db is not initialized for crypt
|
||||
{
|
||||
PrintMessage(MESG_DEBUG, "\n IsMasterPasswordSet : Master password is not set...");
|
||||
retValue = FPM_FALSE;
|
||||
}
|
||||
|
||||
// Free the slot
|
||||
(*PK11FreeSlot) (slot);
|
||||
|
||||
Reference in New Issue
Block a user