1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-08 12:54:21 +01:00

Merge pull request #30 from cam34/master

Modify config-db.php include to check for file instead of doing a (fa…
This commit is contained in:
Klas Lindfors 2015-05-28 13:05:38 +02:00
commit 0a47f1e4cd

View File

@ -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. //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'; $dbuser='ykval_verifier';
$dbpass='yourpassword'; $dbpass='yourpassword';
$basepath=''; $basepath='';
@ -39,7 +41,6 @@ if(!include '/etc/yubico/val/config-db.php') {
$dbtype='mysql'; $dbtype='mysql';
} }
# For the validation interface. # For the validation interface.
$baseParams = array (); $baseParams = array ();
$baseParams['__YKVAL_DB_DSN__'] = "$dbtype:dbname=$dbname;host=127.0.0.1"; # "oci:oracledb" for Oracle DB (with OCI library) $baseParams['__YKVAL_DB_DSN__'] = "$dbtype:dbname=$dbname;host=127.0.0.1"; # "oci:oracledb" for Oracle DB (with OCI library)