summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-10-12 15:49:43 -0300
committerRenato Botelho <renato@netgate.com>2016-10-12 16:23:14 -0300
commit1289c0c17c38048b3f3fa18ff4a0f5a3d3533fdd (patch)
treeaba47ff46f335961f91cae4ba2e228e49209b310 /src/usr/local/www
parenteec44c64709c6e9dfc86f734476e547c3c2f67e8 (diff)
downloadpfsense-1289c0c17c38048b3f3fa18ff4a0f5a3d3533fdd.zip
pfsense-1289c0c17c38048b3f3fa18ff4a0f5a3d3533fdd.tar.gz
Remove all calls to conf_mount_r* functions
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/diag_backup.php6
-rw-r--r--src/usr/local/www/diag_command.php2
-rw-r--r--src/usr/local/www/diag_confbak.php2
-rw-r--r--src/usr/local/www/diag_edit.php2
-rw-r--r--src/usr/local/www/diag_packet_capture.php2
-rw-r--r--src/usr/local/www/index.php2
-rw-r--r--src/usr/local/www/interfaces.php2
-rw-r--r--src/usr/local/www/services_captiveportal_filemanager.php2
-rw-r--r--src/usr/local/www/system_advanced_admin.php2
-rw-r--r--src/usr/local/www/system_groupmanager.php6
-rw-r--r--src/usr/local/www/system_usermanager.php6
-rw-r--r--src/usr/local/www/system_usermanager_addprivs.php3
-rw-r--r--src/usr/local/www/wizards/setup_wizard.xml2
13 files changed, 0 insertions, 39 deletions
diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php
index db38df1..bd3de22 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -164,9 +164,7 @@ function check_and_returnif_section_exists($section) {
if ($_POST['apply']) {
ob_flush();
flush();
- conf_mount_rw();
clear_subsystem_dirty("restore");
- conf_mount_ro();
exit;
}
@@ -311,7 +309,6 @@ if ($_POST) {
write_config();
add_base_packages_menu_items();
convert_config();
- conf_mount_ro();
}
filter_configure();
$savemsg = gettext("The configuration area has been restored. The firewall may need to be rebooted.");
@@ -325,7 +322,6 @@ if ($_POST) {
file_put_contents($_FILES['conffile']['tmp_name'], $data);
if (config_install($_FILES['conffile']['tmp_name']) == 0) {
/* this will be picked up by /index.php */
- conf_mount_rw();
mark_subsystem_dirty("restore");
touch("/conf/needs_package_sync_after_reboot");
/* remove cache, we will force a config reboot */
@@ -349,7 +345,6 @@ if ($_POST) {
write_config();
add_base_packages_menu_items();
convert_config();
- conf_mount_ro();
}
if ($m0n0wall_upgrade == true) {
if ($config['system']['gateway'] <> "") {
@@ -411,7 +406,6 @@ if ($_POST) {
write_config();
add_base_packages_menu_items();
convert_config();
- conf_mount_ro();
$savemsg = gettext("The m0n0wall configuration has been restored and upgraded to pfSense.");
mark_subsystem_dirty("restore");
}
diff --git a/src/usr/local/www/diag_command.php b/src/usr/local/www/diag_command.php
index 8ab67a2..a2de181 100644
--- a/src/usr/local/www/diag_command.php
+++ b/src/usr/local/www/diag_command.php
@@ -61,7 +61,6 @@ if ($_POST['submit'] == "DOWNLOAD" && file_exists($_POST['dlPath'])) {
}
if ($_POST) {
- conf_mount_rw();
}
// Function: is Blank
@@ -324,5 +323,4 @@ if ($_POST['submit'] == "EXEC" && !isBlank($_POST['txtCommand'])):?>
include("foot.inc");
if ($_POST) {
- conf_mount_ro();
}
diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php
index d97ca17..390f295 100644
--- a/src/usr/local/www/diag_confbak.php
+++ b/src/usr/local/www/diag_confbak.php
@@ -44,7 +44,6 @@ if (isset($_POST['backupcount'])) {
return;
}
- conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
if ($_GET['newver'] != "") {
@@ -58,7 +57,6 @@ if (isset($_POST['backupcount'])) {
unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml');
$savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_GET['rmver']), htmlspecialchars($confvers[$_GET['rmver']]['description']));
}
- conf_mount_ro();
}
if ($_GET['getcfg'] != "") {
diff --git a/src/usr/local/www/diag_edit.php b/src/usr/local/www/diag_edit.php
index c419136..10964ea 100644
--- a/src/usr/local/www/diag_edit.php
+++ b/src/usr/local/www/diag_edit.php
@@ -65,10 +65,8 @@ if ($_POST['action']) {
print_info_box(gettext("No file name specified."), 'danger');
print('|');
} else {
- conf_mount_rw();
$_POST['data'] = str_replace("\r", "", base64_decode($_POST['data']));
$ret = file_put_contents($_POST['file'], $_POST['data']);
- conf_mount_ro();
if ($_POST['file'] == "/conf/config.xml" || $_POST['file'] == "/cf/conf/config.xml") {
if (file_exists("/tmp/config.cache")) {
unlink("/tmp/config.cache");
diff --git a/src/usr/local/www/diag_packet_capture.php b/src/usr/local/www/diag_packet_capture.php
index 099906b..5b15ada 100644
--- a/src/usr/local/www/diag_packet_capture.php
+++ b/src/usr/local/www/diag_packet_capture.php
@@ -188,7 +188,6 @@ if ($_POST) {
if (!count($input_errors)) {
$do_tcpdump = true;
- conf_mount_rw();
if ($_POST['promiscuous']) {
//if promiscuous mode is checked
@@ -491,7 +490,6 @@ if ($do_tcpdump) :
system("/usr/sbin/tcpdump {$disabledns} {$detail_args} {$iscarp} -r {$fp}{$fn}");
print('</textarea>');
- conf_mount_ro();
?>
</div>
</div>
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index d1a5ed32..460ddbd 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -165,9 +165,7 @@ if (file_exists('/conf/needs_package_sync')) {
}
}
} else {
- conf_mount_rw();
@unlink('/conf/needs_package_sync');
- conf_mount_ro();
}
}
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index b976c2a..9ee3a12 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -467,7 +467,6 @@ if ($_POST['apply']) {
} else {
$pconfig['track6-prefix-id'] = 0;
}
- conf_mount_rw();
/* filter out spaces from descriptions */
$_POST['descr'] = remove_bad_chars($_POST['descr']);
@@ -1392,7 +1391,6 @@ if ($_POST['apply']) {
handle_wireless_post();
}
- conf_mount_ro();
write_config();
if (file_exists("{$g['tmp_path']}/.interfaces.apply")) {
diff --git a/src/usr/local/www/services_captiveportal_filemanager.php b/src/usr/local/www/services_captiveportal_filemanager.php
index 1f4e93e..e4fc420 100644
--- a/src/usr/local/www/services_captiveportal_filemanager.php
+++ b/src/usr/local/www/services_captiveportal_filemanager.php
@@ -120,10 +120,8 @@ if ($_POST) {
}
}
} else if (($_GET['act'] == "del") && !empty($cpzone) && $a_element[$_GET['id']]) {
- conf_mount_rw();
@unlink("{$g['captiveportal_element_path']}/" . $a_element[$_GET['id']]['name']);
@unlink("{$g['captiveportal_path']}/" . $a_element[$_GET['id']]['name']);
- conf_mount_ro();
unset($a_element[$_GET['id']]);
write_config();
header("Location: services_captiveportal_filemanager.php?zone={$cpzone}");
diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php
index 01527c8..b7207c4 100644
--- a/src/usr/local/www/system_advanced_admin.php
+++ b/src/usr/local/www/system_advanced_admin.php
@@ -270,7 +270,6 @@ if ($_POST) {
$savemsg .= sprintf("<br />" . gettext("One moment...redirecting to %s in 20 seconds."), $url);
}
- conf_mount_rw();
setup_serial_port();
// Restart DNS in case dns rebinding toggled
if (isset($config['dnsmasq']['enable'])) {
@@ -278,7 +277,6 @@ if ($_POST) {
} elseif (isset($config['unbound']['enable'])) {
services_unbound_configure();
}
- conf_mount_ro();
}
}
diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php
index 6668e57..d103863 100644
--- a/src/usr/local/www/system_groupmanager.php
+++ b/src/usr/local/www/system_groupmanager.php
@@ -73,9 +73,7 @@ if ($act == "delgroup") {
exit;
}
- conf_mount_rw();
local_group_del($a_group[$id]);
- conf_mount_ro();
$groupdeleted = $a_group[$id]['name'];
unset($a_group[$id]);
write_config();
@@ -124,9 +122,7 @@ if (isset($_GET['dellall_x'])) {
if (!empty($del_groups)) {
foreach ($del_groups as $groupid) {
if (isset($a_group[$groupid]) && $a_group[$groupid]['scope'] != "system") {
- conf_mount_rw();
local_group_del($a_group[$groupid]);
- conf_mount_ro();
unset($a_group[$groupid]);
}
}
@@ -203,9 +199,7 @@ if (isset($_POST['save'])) {
admin_groups_sort();
- conf_mount_rw();
local_group_set($group);
- conf_mount_ro();
/* Refresh users in this group since their privileges may have changed. */
if (is_array($group['member'])) {
diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php
index 8baa028..07565e4 100644
--- a/src/usr/local/www/system_usermanager.php
+++ b/src/usr/local/www/system_usermanager.php
@@ -91,9 +91,7 @@ if ($_GET['act'] == "deluser") {
if ($_GET['username'] == $_SESSION['Username']) {
$delete_errors[] = sprintf(gettext("Cannot delete user %s because you are currently logged in as that user."), $_GET['username']);
} else {
- conf_mount_rw();
local_user_del($a_user[$id]);
- conf_mount_ro();
$userdeleted = $a_user[$id]['name'];
unset($a_user[$id]);
write_config();
@@ -122,12 +120,10 @@ if (isset($_POST['dellall'])) {
if ($a_user[$userid]['name'] == $_SESSION['Username']) {
$delete_errors[] = sprintf(gettext("Cannot delete user %s because you are currently logged in as that user."), $a_user[$userid]['name']);
} else {
- conf_mount_rw();
$deleted_users = $deleted_users . $comma . $a_user[$userid]['name'];
$comma = ", ";
$deleted_count++;
local_user_del($a_user[$userid]);
- conf_mount_ro();
unset($a_user[$userid]);
}
} else {
@@ -276,7 +272,6 @@ if ($_POST['save']) {
if (!$input_errors) {
- conf_mount_rw();
$userent = array();
if (isset($id) && $a_user[$id]) {
$userent = $a_user[$id];
@@ -427,7 +422,6 @@ if ($_POST['save']) {
run_plugins("/etc/inc/privhooks");
}
- conf_mount_ro();
pfSenseHeader("system_usermanager.php");
}
diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php
index 96a3225..ee6d416 100644
--- a/src/usr/local/www/system_usermanager_addprivs.php
+++ b/src/usr/local/www/system_usermanager_addprivs.php
@@ -60,7 +60,6 @@ uasort($spriv_list, "admusercmp");
if ($_POST) {
- conf_mount_rw();
unset($input_errors);
$pconfig = $_POST;
@@ -87,14 +86,12 @@ if ($_POST) {
local_user_set($a_user);
$retval = write_config();
$savemsg = get_std_save_message($retval);
- conf_mount_ro();
post_redirect("system_usermanager.php", array('act' => 'edit', 'userid' => $userid));
exit;
}
- conf_mount_ro();
}
function build_priv_list() {
diff --git a/src/usr/local/www/wizards/setup_wizard.xml b/src/usr/local/www/wizards/setup_wizard.xml
index ecacf64..a9df30c 100644
--- a/src/usr/local/www/wizards/setup_wizard.xml
+++ b/src/usr/local/www/wizards/setup_wizard.xml
@@ -34,9 +34,7 @@
</field>
</fields>
<stepbeforeformdisplay>
- conf_mount_rw();
unlink_if_exists('/conf/trigger_initial_wizard');
- conf_mount_ro();
</stepbeforeformdisplay>
</step>
<step>
OpenPOWER on IntegriCloud