mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
dnsmasq: add logfacility file to jail mounts
If logfacility is a path to a file it needs to be r/w mounted in the sandbox as well for dnsmasq to work. Reported-by: @iointerrupt Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
46980294f6
commit
2b5fa44f60
@ -820,7 +820,7 @@ dnsmasq_ipset_add() {
|
|||||||
dnsmasq_start()
|
dnsmasq_start()
|
||||||
{
|
{
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
local disabled user_dhcpscript
|
local disabled user_dhcpscript logfacility
|
||||||
local resolvfile resolvdir localuse=0
|
local resolvfile resolvdir localuse=0
|
||||||
|
|
||||||
config_get_bool disabled "$cfg" disabled 0
|
config_get_bool disabled "$cfg" disabled 0
|
||||||
@ -933,7 +933,7 @@ dnsmasq_start()
|
|||||||
append_bool "$cfg" scriptarp "--script-arp"
|
append_bool "$cfg" scriptarp "--script-arp"
|
||||||
|
|
||||||
append_parm "$cfg" logfacility "--log-facility"
|
append_parm "$cfg" logfacility "--log-facility"
|
||||||
|
config_get logfacility "$cfg" "logfacility"
|
||||||
append_parm "$cfg" cachesize "--cache-size"
|
append_parm "$cfg" cachesize "--cache-size"
|
||||||
append_parm "$cfg" dnsforwardmax "--dns-forward-max"
|
append_parm "$cfg" dnsforwardmax "--dns-forward-max"
|
||||||
append_parm "$cfg" port "--port"
|
append_parm "$cfg" port "--port"
|
||||||
@ -1167,6 +1167,10 @@ dnsmasq_start()
|
|||||||
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
|
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
|
||||||
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
|
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
|
||||||
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
|
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
|
||||||
|
case "$logfacility" in */*)
|
||||||
|
[ ! -e "$logfacility" ] && touch "$logfacility"
|
||||||
|
procd_add_jail_mount_rw "$logfacility"
|
||||||
|
esac
|
||||||
|
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user