From 0a52e8611fde0398fd69eb406c8aacc3e8b3f908 Mon Sep 17 00:00:00 2001 From: Cam Date: Thu, 28 May 2015 01:06:57 +0000 Subject: [PATCH] Modify config-db.php include to check for file instead of doing a (failed) include and spamming the log files that the file doesn't exist --- ykval-config.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ykval-config.php b/ykval-config.php index e577666..ab20fc3 100644 --- a/ykval-config.php +++ b/ykval-config.php @@ -29,7 +29,9 @@ //ykval will use the configuration stored in /etc/yubico/val/config-db.php, if that file exists. If it does not exist, the below values will be used. -if(!include '/etc/yubico/val/config-db.php') { +if(file_exists('/etc/yubico/val/config-db.php')) { + include '/etc/yubico/val/config-db.php'; +} else { $dbuser='ykval_verifier'; $dbpass='yourpassword'; $basepath=''; @@ -39,7 +41,6 @@ if(!include '/etc/yubico/val/config-db.php') { $dbtype='mysql'; } - # For the validation interface. $baseParams = array (); $baseParams['__YKVAL_DB_DSN__'] = "$dbtype:dbname=$dbname;host=127.0.0.1"; # "oci:oracledb" for Oracle DB (with OCI library)