зеркало из https://github.com/mozilla/pjs.git
Cause NSS_init() to fail if it can't open the databases, rather than succeding and leaving the system half initialized.
This commit is contained in:
Родитель
2aeb53d1fb
Коммит
bc07e632e4
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче