Cause NSS_init() to fail if it can't open the databases, rather than succeding and leaving the system half initialized.
git-svn-id: svn://10.0.0.236/trunk@108245 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2d6da23758
commit
fc6b6ceee3
@ -32,7 +32,7 @@
|
||||
* may use your version of this file under either the MPL or the
|
||||
* GPL.
|
||||
*
|
||||
# $Id: nssinit.c,v 1.26 2001-11-08 00:15:03 relyea%netscape.com Exp $
|
||||
# $Id: nssinit.c,v 1.27 2001-11-16 02:30:35 relyea%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
@ -240,9 +240,12 @@ nss_Init(const char *configdir, const char *certPrefix, const char *keyPrefix,
|
||||
}
|
||||
}
|
||||
|
||||
STAN_LoadDefaultNSS3TrustDomain();
|
||||
CERT_SetDefaultCertDB((CERTCertDBHandle *)
|
||||
if (rv == SECSuccess) {
|
||||
/* can this function fail?? */
|
||||
STAN_LoadDefaultNSS3TrustDomain();
|
||||
CERT_SetDefaultCertDB((CERTCertDBHandle *)
|
||||
STAN_GetDefaultTrustDomain());
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@ -310,6 +310,7 @@ SECMOD_LoadModule(char *modulespec,SECMODModule *parent, PRBool recurse)
|
||||
child = SECMOD_LoadModule(*index,module,PR_TRUE);
|
||||
if (!child) break;
|
||||
if (child->isCritical && !child->loaded) {
|
||||
rv = SECFailure;
|
||||
SECMOD_DestroyModule(child);
|
||||
break;
|
||||
}
|
||||
@ -339,6 +340,9 @@ SECMOD_LoadModule(char *modulespec,SECMODModule *parent, PRBool recurse)
|
||||
|
||||
loser:
|
||||
if (module) {
|
||||
if (module->loaded) {
|
||||
SECMOD_UnloadModule(module);
|
||||
}
|
||||
SECMOD_AddModuleToUnloadList(module);
|
||||
}
|
||||
return module;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user