From 56d9e3d0af7d21304cf50d6b00dc57879d7f755d Mon Sep 17 00:00:00 2001 From: "wtc%google.com" Date: Fri, 29 May 2009 19:23:30 +0000 Subject: [PATCH] Bug 495103: nss_Init should strip the "sql:" prefix from the pathname passed to nss_FindExternalRoot. r=rrelyea. git-svn-id: svn://10.0.0.236/trunk@257304 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/nss/nssinit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mozilla/security/nss/lib/nss/nssinit.c b/mozilla/security/nss/lib/nss/nssinit.c index 5793defef18..7922e7a5e82 100644 --- a/mozilla/security/nss/lib/nss/nssinit.c +++ b/mozilla/security/nss/lib/nss/nssinit.c @@ -36,9 +36,10 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: nssinit.c,v 1.97 2008-08-22 01:33:03 wtc%google.com Exp $ */ +/* $Id: nssinit.c,v 1.98 2009-05-29 19:23:30 wtc%google.com Exp $ */ #include +#include #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();