diff --git a/src/etc/inc/plugins.inc.d/unbound.inc b/src/etc/inc/plugins.inc.d/unbound.inc index 6586e1fd6..2d21e006b 100644 --- a/src/etc/inc/plugins.inc.d/unbound.inc +++ b/src/etc/inc/plugins.inc.d/unbound.inc @@ -219,12 +219,6 @@ EOF; unbound_add_domain_overrides(); unbound_acls_config(); - // Add custom Unbound options - $custom_options = ''; - if (!empty($config['unbound']['custom_options'])) { - $custom_options = "# Unbound custom options\n{$config['unbound']['custom_options']}\n"; - } - $port = is_port($config['unbound']['port']) ? $config['unbound']['port'] : "53"; $hide_id = !empty($config['unbound']['hideidentity']) ? "yes" : "no"; $hide_version = !empty($config['unbound']['hideversion']) ? "yes" : "no"; @@ -361,11 +355,9 @@ include: /var/unbound/host_entries.conf # Domain overrides include: /var/unbound/domainoverrides.conf -# Custom includes (plugins) +# Custom includes include: /var/unbound/etc/*.conf -{$custom_options} - {$forward_conf} remote-control: diff --git a/src/www/services_unbound.php b/src/www/services_unbound.php index 33c3433c0..835e4fef6 100644 --- a/src/www/services_unbound.php +++ b/src/www/services_unbound.php @@ -50,7 +50,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig['txtsupport'] = isset($a_unboundcfg['txtsupport']); // text values $pconfig['port'] = !empty($a_unboundcfg['port']) ? $a_unboundcfg['port'] : null; - $pconfig['custom_options'] = !empty($a_unboundcfg['custom_options']) ? $a_unboundcfg['custom_options'] : null; $pconfig['regdhcpdomain'] = !empty($a_unboundcfg['regdhcpdomain']) ? $a_unboundcfg['regdhcpdomain'] : null; $pconfig['dns64prefix'] = !empty($a_unboundcfg['dns64prefix']) ? $a_unboundcfg['dns64prefix'] : null; // array types @@ -87,10 +86,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (!empty($pconfig['local_zone_type']) && !array_key_exists($pconfig['local_zone_type'], unbound_local_zone_types())) { $input_errors[] = sprintf(gettext('Local zone type "%s" is not known.'), $pconfig['local_zone_type']); } - $prev_opt = !empty($a_unboundcfg['custom_options']) ? $a_unboundcfg['custom_options'] : ""; - if ($prev_opt != str_replace("\r\n", "\n", $pconfig['custom_options']) && !userIsAdmin($_SESSION['Username'])) { - $input_errors[] = gettext('Advanced options may only be edited by system administrators due to the increased possibility of privilege escalation.'); - } if (count($input_errors) == 0) { // text types @@ -115,8 +110,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { unset($a_unboundcfg['local_zone_type']); } - $a_unboundcfg['custom_options'] = !empty($pconfig['custom_options']) ? str_replace("\r\n", "\n", $pconfig['custom_options']) : null; - // boolean values $a_unboundcfg['enable'] = !empty($pconfig['enable']); $a_unboundcfg['enable_wpad'] = !empty($pconfig['enable_wpad']); @@ -177,7 +170,7 @@ include_once("head.inc"); $(window).trigger('resize'); }); // show advanced when option set - if ($("#outgoing_interface").val() != '' || $("#custom_options").val() != '' || $("#enable_wpad").prop('checked')) { + if ($("#outgoing_interface").val() != '' || $("#enable_wpad").prop('checked')) { $("#show_advanced_dns").click(); } }); @@ -344,16 +337,6 @@ include_once("head.inc"); - - - - - - - - @@ -363,7 +346,6 @@ include_once("head.inc"); -