[openwrt/openwrt] dnsmasq: add dhcphostsfile to ujail sandbox

LEDE Commits lede-commits at lists.infradead.org
Sun Apr 2 16:49:44 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/5030620db650b873b3214f425809516d5220d9bc

commit 5030620db650b873b3214f425809516d5220d9bc
Author: Ruben Jenster <rjenster at gmail.com>
AuthorDate: Thu Mar 23 11:15:52 2023 +0100

    dnsmasq: add dhcphostsfile to ujail sandbox
    
    The dhcphostsfile must be mounted into the (ujail) sandbox.
    The file can not be accessed without this mount.
    
    Signed-off-by: Ruben Jenster <rjenster at gmail.com>
    (cherry picked from commit 936df715de3d33947ce38ca232b05c2bd3ef58f1)
---
 package/network/services/dnsmasq/files/dnsmasq.init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index c4ca3eb2db..d2bcca46ed 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1178,6 +1178,7 @@ dnsmasq_start()
 		[ ! -e "$logfacility" ] && touch "$logfacility"
 		procd_add_jail_mount_rw "$logfacility"
 	esac
+	[ -e "$hostsfile" ] && procd_add_jail_mount $hostsfile
 
 	procd_close_instance
 }




More information about the lede-commits mailing list