Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
503bf9fc
Commit
503bf9fc
authored
May 23, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
May 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(dnsmasq) add some missing escapes
(cherry picked from commit
f57c0f04
)
parent
75d7ff54
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
services.inc
src/etc/inc/services.inc
+7
-8
No files found.
src/etc/inc/services.inc
View file @
503bf9fc
...
...
@@ -1839,7 +1839,6 @@ function dyndnsCheckIP($int)
function
services_dnsmasq_configure
()
{
global
$config
;
$return
=
0
;
// hard coded args: will be removed to avoid duplication if specified in custom_options
$standard_args
=
array
(
...
...
@@ -1935,9 +1934,10 @@ function services_dnsmasq_configure()
/* Setup forwarded domains */
if
(
isset
(
$config
[
'dnsmasq'
][
'domainoverrides'
])
&&
is_array
(
$config
[
'dnsmasq'
][
'domainoverrides'
]))
{
foreach
(
$config
[
'dnsmasq'
][
'domainoverrides'
]
as
$override
)
{
if
(
$override
[
'ip'
]
==
"!"
)
$override
[
ip
]
=
""
;
$args
.=
' --server=/'
.
$override
[
'domain'
]
.
'/'
.
$override
[
'ip'
];
if
(
$override
[
'ip'
]
==
"!"
)
{
$override
[
'ip'
]
=
""
;
}
$args
.=
' --server='
.
escapeshellarg
(
'/'
.
$override
[
'domain'
]
.
'/'
.
$override
[
'ip'
]);
}
}
...
...
@@ -1945,7 +1945,7 @@ function services_dnsmasq_configure()
if
(
isset
(
$config
[
'dnsmasq'
][
'domainoverrides'
])
&&
is_array
(
$config
[
'dnsmasq'
][
'domainoverrides'
]))
{
if
(
!
isset
(
$config
[
'system'
][
'webgui'
][
'nodnsrebindcheck'
]))
{
foreach
(
$config
[
'dnsmasq'
][
'domainoverrides'
]
as
$override
)
{
$args
.=
' --rebind-domain-ok=
/'
.
$override
[
'domain'
]
.
'/ '
;
$args
.=
' --rebind-domain-ok=
'
.
escapeshellarg
(
'/'
.
$override
[
'domain'
]
.
'/'
)
.
' '
;
}
}
}
...
...
@@ -1975,7 +1975,6 @@ function services_dnsmasq_configure()
/* run dnsmasq */
$cmd
=
"/usr/local/sbin/dnsmasq --all-servers
{
$dns_rebind
}
{
$args
}
"
;
//log_error("dnsmasq command: {$cmd}");
mwexec_bg
(
$cmd
);
system_dhcpleases_configure
();
unset
(
$args
);
...
...
@@ -1987,11 +1986,11 @@ function services_dnsmasq_configure()
if
(
!
file_exists
(
"/var/run/booting"
))
{
if
(
services_dhcpd_configure
()
!=
0
)
{
$return
=
1
;
return
1
;
}
}
return
$return
;
return
0
;
}
function
services_unbound_configure
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment