1ec1d7de1bf1b5a53ae42a90563471772f2a9e83
max
  Thu Apr 3 06:24:31 2014 -0700
further support to remove .nib access via an hg.conf option. refs #11957
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index c8703c9..ff66a38 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -947,31 +947,31 @@
         safecpy(trackName, HDB_MAX_TABLE_STRING, ptr+1);
 	}
     }
 }
 
 int hChromSize(char *db, char *chromName)
 /* Return size of chromosome. */
 {
 struct chromInfo *ci = mustGetChromInfo(db, chromName);
 return ci->size;
 }
 
 void hNibForChrom(char *db, char *chromName, char retNibName[HDB_MAX_PATH_STRING])
 /* Get .nib file associated with chromosome. */
 {
-if (hDbIsActive(db))
+if (hDbIsActive(db) && cfgOptionBooleanDefault("allowNib", TRUE))
     {
     struct chromInfo *ci = mustGetChromInfo(db, chromName);
     safef(retNibName, HDB_MAX_PATH_STRING, "%s", ci->fileName);
     }
 else
     {
     char *nibPath = hDbDbNibPath(db);
 
     if (nibPath == NULL)
 	errAbort("nibPath is NULL for database '%s'", db);
 
     safef(retNibName, HDB_MAX_PATH_STRING, "%s/%s.2bit",
 	nibPath, db);
     if (!fileExists(retNibName))
 	{