small fixes

This commit is contained in:
Ad Schellevis 2015-03-13 17:02:25 +00:00
parent 17aabc1e54
commit eae996e590
3 changed files with 2 additions and 17 deletions

View File

@ -176,9 +176,10 @@ if(function_exists("display_error_form") && !isset($config['system']['webgui']['
$security_passed = false;
}
if (function_exists("display_error_form") && $security_passed)
if (function_exists("display_error_form") && $security_passed) {
/* Security checks passed, so it should be OK to turn them back on */
restore_security_checks();
}
unset($security_passed);
$groupindex = index_groups();

View File

@ -62,20 +62,6 @@ if(file_exists("/debugging")) {
$g['debug'] = true;
}
if(file_exists("/var/run/booting") && file_exists("/conf/config.xml")) {
$config_contents = file_get_contents("/conf/config.xml");
if(stristr($config_contents, "<m0n0wall>") == true) {
/* user has just upgraded to m0n0wall, replace root xml tags */
log_error(gettext("Upgrading m0n0wall configuration to pfSense... "));
$config_contents = str_replace("m0n0wall","pfsense", $config_contents);
if (!config_validate('/conf/config.xml'))
log_error(gettext("ERROR! Could not convert m0n0wall -> pfsense in config.xml"));
$fd = fopen("/conf/config.xml", "w");
fwrite($fd, $config_contents);
fclose($fd);
}
}
/* if our config file exists bail out, we're already set. */
else if (file_exists("/var/run/booting") && !file_exists('/conf/config.xml')) {
/* find the device where config.xml resides and write out an fstab */

View File

@ -332,10 +332,8 @@ function config_install($conffile)
copy($conffile, '/conf/config.xml');
disable_security_checks();
@unlink('/tmp/config.cache');
unlock($lockkey);
conf_mount_ro();
return 0;
}