From 0174c48022b15978836ecd7b32d8e2d7a4a638c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20LU=C3=87I?= Date: Thu, 27 Nov 2014 21:41:19 +0100 Subject: Use the pfsense module functions rather than execing. Fixes also possible attack vectors. --- usr/local/www/diag_backup.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'usr/local') diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index d71a3b2..5192c4a 100644 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -411,6 +411,13 @@ if ($_POST) { if(file_exists("{$g['tmp_path']}/config.cache")) unlink("{$g['tmp_path']}/config.cache"); $config = parse_config(true); + if (file_exists("/boot/loader.conf")) { + $loaderconf = file_get_contents("/boot/loader.conf"); + if (strpos($loaderconf, "comconsole")) { + $config['system']['enableserial'] = true; + write_config("Restore serial console enabling in configuration."); + } + } /* extract out rrd items, unset from $config when done */ if($config['rrddata']) { restore_rrddata(); -- cgit v1.1