summaryrefslogtreecommitdiff
path: root/security/nss/lib/nss/nssinit.c
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2009-05-29 19:23:30 +0000
committerwtc%google.com <devnull@localhost>2009-05-29 19:23:30 +0000
commit18c89b96e9027f291324c59798bd055fa1e86f4c (patch)
treeb16c71ff7fc0e9bf101ef4a7ed0bf31ab624338a /security/nss/lib/nss/nssinit.c
parentf839eadbf57c9464857cdb3bed64fdb518cb1984 (diff)
downloadnss-hg-18c89b96e9027f291324c59798bd055fa1e86f4c.tar.gz
Bug 495103: nss_Init should strip the "sql:" prefix from the pathname
passed to nss_FindExternalRoot. r=rrelyea.
Diffstat (limited to 'security/nss/lib/nss/nssinit.c')
-rw-r--r--security/nss/lib/nss/nssinit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/security/nss/lib/nss/nssinit.c b/security/nss/lib/nss/nssinit.c
index 2e4760b2d..1600dfd80 100644
--- a/security/nss/lib/nss/nssinit.c
+++ b/security/nss/lib/nss/nssinit.c
@@ -39,6 +39,7 @@
/* $Id$ */
#include <ctype.h>
+#include <string.h>
#include "seccomon.h"
#include "prinit.h"
#include "prprf.h"
@@ -555,7 +556,11 @@ loser:
STAN_GetDefaultTrustDomain());
if ((!noModDB) && (!noCertDB) && (!noRootInit)) {
if (!SECMOD_HasRootCerts()) {
- nss_FindExternalRoot(configdir, secmodName);
+ const char *dbpath = configdir;
+ if (strncmp(dbpath, "sql:", 4) == 0) {
+ dbpath += 4;
+ }
+ nss_FindExternalRoot(dbpath, secmodName);
}
}
pk11sdr_Init();