Index: nss/lib/softoken/sdb.c |
=================================================================== |
--- nss/lib/softoken/sdb.c (revision 256695) |
+++ nss/lib/softoken/sdb.c (working copy) |
@@ -2012,7 +2012,17 @@ |
/* how long does it take to test for a non-existant file in our working |
* directory? Allows us to test if we may be on a network file system */ |
- accessOps = sdb_measureAccess(directory); |
+ accessOps = 1; |
+ { |
+ char *env; |
+ env = PR_GetEnv("NSS_SDB_USE_CACHE"); |
+ /* If the environment variable is set to yes or no, sdb_init() will |
+ * ignore the value of accessOps, and we can skip the measuring.*/ |
+ if (!env || ((PORT_Strcasecmp(env, "no") != 0) && |
+ (PORT_Strcasecmp(env, "yes") != 0))){ |
+ accessOps = sdb_measureAccess(directory); |
+ } |
+ } |
/* |
* open the cert data base |