Commit 88ddc985 authored by Franco Fichtner's avatar Franco Fichtner

unbound: strip $g here too

parent bbb0d208
...@@ -142,7 +142,7 @@ function unbound_optimization() ...@@ -142,7 +142,7 @@ function unbound_optimization()
function unbound_generate_config() function unbound_generate_config()
{ {
global $config, $g; global $config;
// Setup optimization // Setup optimization
$optimization = unbound_optimization(); $optimization = unbound_optimization();
...@@ -399,9 +399,8 @@ EOD; ...@@ -399,9 +399,8 @@ EOD;
return 0; return 0;
} }
function unbound_remote_control_setup() { function unbound_remote_control_setup()
global $g; {
if (!file_exists('/var/unbound/remotecontrol.conf') || !file_exists('/var/unbound/unbound_control.key')) { if (!file_exists('/var/unbound/remotecontrol.conf') || !file_exists('/var/unbound/unbound_control.key')) {
$remotcfg = <<<EOF $remotcfg = <<<EOF
remote-control: remote-control:
...@@ -448,7 +447,7 @@ function unbound_configure_do($verbose = false) ...@@ -448,7 +447,7 @@ function unbound_configure_do($verbose = false)
function unbound_execute($cmd) function unbound_execute($cmd)
{ {
global $g, $config; global $config;
switch ($cmd) { switch ($cmd) {
case 'start': case 'start':
...@@ -487,8 +486,9 @@ function unbound_execute($cmd) ...@@ -487,8 +486,9 @@ function unbound_execute($cmd)
} }
} }
function unbound_add_domain_overrides($pvt=false) { function unbound_add_domain_overrides($pvt = false)
global $config, $g; {
global $config;
$domains = $config['unbound']['domainoverrides']; $domains = $config['unbound']['domainoverrides'];
...@@ -527,7 +527,7 @@ function unbound_add_domain_overrides($pvt=false) { ...@@ -527,7 +527,7 @@ function unbound_add_domain_overrides($pvt=false) {
function unbound_add_host_entries() function unbound_add_host_entries()
{ {
global $config, $g; global $config;
$unbound_entries = "local-zone: \"{$config['system']['domain']}\" transparent\n"; $unbound_entries = "local-zone: \"{$config['system']['domain']}\" transparent\n";
...@@ -692,9 +692,9 @@ EOF; ...@@ -692,9 +692,9 @@ EOF;
return $stats; return $stats;
} }
// Unbound Access lists function unbound_acls_config()
function unbound_acls_config() { {
global $g, $config; global $config;
$aclcfg = "access-control: 127.0.0.1/32 allow\n"; $aclcfg = "access-control: 127.0.0.1/32 allow\n";
$aclcfg .= "access-control: ::1 allow\n"; $aclcfg .= "access-control: ::1 allow\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment