mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-25 13:49:26 +00:00
dnsmasq: quote paths (avoid names with spaces problems)
Tested on 24.snapshot Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
parent
f84187035e
commit
9c3f624d8e
@ -1164,7 +1164,7 @@ dnsmasq_start()
|
||||
config_get_bool enable_tftp "$cfg" enable_tftp 0
|
||||
[ "$enable_tftp" -gt 0 ] && {
|
||||
config_get tftp_root "$cfg" tftp_root
|
||||
append EXTRA_MOUNT $tftp_root
|
||||
append EXTRA_MOUNT "$tftp_root"
|
||||
}
|
||||
|
||||
config_foreach filter_dnsmasq host dhcp_host_add "$cfg"
|
||||
@ -1241,8 +1241,8 @@ dnsmasq_start()
|
||||
config_list_foreach "$cfg" addnmount append_extramount
|
||||
|
||||
procd_open_instance $cfg
|
||||
procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid
|
||||
procd_set_param file $CONFIGFILE
|
||||
procd_set_param command $PROG -C "$CONFIGFILE" -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid
|
||||
procd_set_param file "$CONFIGFILE"
|
||||
[ -n "$user_dhcpscript" ] && procd_set_param env USER_DHCPSCRIPT="$user_dhcpscript"
|
||||
procd_set_param respawn
|
||||
|
||||
@ -1252,16 +1252,16 @@ dnsmasq_start()
|
||||
[ -n "$instance_netdev" ] && procd_set_param netdev $instance_netdev
|
||||
|
||||
procd_add_jail dnsmasq ubus log
|
||||
procd_add_jail_mount $CONFIGFILE $DHCPBOGUSHOSTNAMEFILE $DHCPSCRIPT $DHCPSCRIPT_DEPENDS
|
||||
procd_add_jail_mount $EXTRA_MOUNT $RFC6761FILE $TRUSTANCHORSFILE
|
||||
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
|
||||
procd_add_jail_mount "$CONFIGFILE" "$DHCPBOGUSHOSTNAMEFILE" "$DHCPSCRIPT" "$DHCPSCRIPT_DEPENDS"
|
||||
procd_add_jail_mount "$EXTRA_MOUNT" "$RFC6761FILE" "$TRUSTANCHORSFILE"
|
||||
procd_add_jail_mount "$dnsmasqconffile" "$dnsmasqinstanceconfdir" "$resolvdir" "$user_dhcpscript"
|
||||
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
|
||||
[ -e "$hostsfile" ] && procd_add_jail_mount $hostsfile
|
||||
[ -e "$hostsfile" ] && procd_add_jail_mount "$hostsfile"
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user