Commit 4b825e9d authored by haemmer's avatar haemmer
Browse files

The default lock file name now also contains instance name. This should...

The default lock file name now also contains instance name. This should prevent that multiple instances are locking each other without sharing any data.
parent 3e2778dd
...@@ -59,6 +59,7 @@ function initConfigOptions(){ ...@@ -59,6 +59,7 @@ function initConfigOptions(){
// Set independet default configuration options // Set independet default configuration options
$defaults = array(); $defaults = array();
$defaults['instanceIdentifier'] = 'SWITCHwayf';
$defaults['defaultLanguage'] = 'en'; $defaults['defaultLanguage'] = 'en';
$defaults['commonDomain'] = getTopLevelDomain($_SERVER['SERVER_NAME']); $defaults['commonDomain'] = getTopLevelDomain($_SERVER['SERVER_NAME']);
$defaults['cookieNamePrefix'] = ''; $defaults['cookieNamePrefix'] = '';
...@@ -94,10 +95,10 @@ function initConfigOptions(){ ...@@ -94,10 +95,10 @@ function initConfigOptions(){
$defaults['metadataFile'] = '/etc/shibboleth/metadata.switchaai.xml'; $defaults['metadataFile'] = '/etc/shibboleth/metadata.switchaai.xml';
$defaults['metadataIDPFile'] = 'IDProvider.metadata.php'; $defaults['metadataIDPFile'] = 'IDProvider.metadata.php';
$defaults['metadataSPFile'] = 'SProvider.metadata.php'; $defaults['metadataSPFile'] = 'SProvider.metadata.php';
$defaults['metadataLockFile'] = (substr($_SERVER['PATH'],0,1) == '/') ? '/tmp/wayf_metadata.lock' : 'C:\windows\TEMP'; $lockFileName = preg_replace('/[^-_\.a-zA-Z]/', '', $defaults['instanceIdentifier']);
$defaults['metadataLockFile'] = (substr($_SERVER['PATH'],0,1) == '/') ? '/tmp/wayf_metadata-'.$lockFileName.'.lock' : 'C:\windows\TEMP\wayf_metadata-'.$lockFileName.'.lock';
$defaults['WAYFLogFile'] = '/var/log/apache2/wayf.log'; $defaults['WAYFLogFile'] = '/var/log/apache2/wayf.log';
$defaults['kerberosRedirectURL'] = dirname($_SERVER['SCRIPT_NAME']).'kerberosRedirect.php'; $defaults['kerberosRedirectURL'] = dirname($_SERVER['SCRIPT_NAME']).'kerberosRedirect.php';
$defaults['instanceIdentifier'] = 'SWITCHwayf';
$defaults['developmentMode'] = false; $defaults['developmentMode'] = false;
// Initialize independent defaults // Initialize independent defaults
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment