diff options
author | John Crispin <blogic@openwrt.org> | 2015-03-26 10:58:30 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-03-26 10:58:30 +0000 |
commit | 324ca9971e7039cd03f206c2afe17a81672f11e8 (patch) | |
tree | c3b7922a734ba6ae9f234ef24162ef86cbe8054b | |
parent | beb93b24f7036caec368a3f70ee6f3c72bba84f0 (diff) | |
download | upstream-324ca9971e7039cd03f206c2afe17a81672f11e8.tar.gz upstream-324ca9971e7039cd03f206c2afe17a81672f11e8.tar.bz2 upstream-324ca9971e7039cd03f206c2afe17a81672f11e8.zip |
dnsmasq: add jail support
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45011 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index a0197ef764..052a22dade 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -547,13 +547,22 @@ start_service() { config_load dhcp procd_open_instance - procd_set_param command $PROG -C $CONFIGFILE -k + procd_set_param command $PROG -C $CONFIGFILE -d -x /var/run/dnsmasq/dnsmasq.pid procd_set_param file $CONFIGFILE procd_set_param respawn + + procd_add_jail dnsmasq ubus log + procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE /etc/passwd /dev/urandom /etc/dnsmasq.conf /tmp/dnsmasq.d /tmp/resolv.conf.auto /etc/hosts /etc/ethers + procd_add_jail_mount_rw /var/run/dnsmasq/ /tmp/dhcp.leases + procd_close_instance # before we can call xappend + mkdir -p /var/run/dnsmasq/ mkdir -p $(dirname $CONFIGFILE) + mkdir -p /var/lib/misc + touch /tmp/dhcp.leases + echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE |