summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_backup.php
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-11-27 21:41:19 +0100
committerErmal LUÇI <eri@pfsense.org>2014-11-27 21:44:01 +0100
commit0174c48022b15978836ecd7b32d8e2d7a4a638c7 (patch)
tree469b80df6fc9daf517788f0fa29551934726a092 /usr/local/www/diag_backup.php
parent045287e8ec1b8239784af43ad1e121ceadd8af2d (diff)
downloadpfsense-0174c48022b15978836ecd7b32d8e2d7a4a638c7.zip
pfsense-0174c48022b15978836ecd7b32d8e2d7a4a638c7.tar.gz
Use the pfsense module functions rather than execing. Fixes also possible attack vectors.
Diffstat (limited to 'usr/local/www/diag_backup.php')
-rw-r--r--usr/local/www/diag_backup.php7
1 files changed, 7 insertions, 0 deletions
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();
OpenPOWER on IntegriCloud