[openwrt/openwrt] dnsmasq: fix jail_mount for serversfile

LEDE Commits lede-commits at lists.infradead.org
Wed Aug 10 06:08:28 PDT 2022


dangole pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/0179ba7851631416c6f095a9bdd22377d68a0455

commit 0179ba7851631416c6f095a9bdd22377d68a0455
Author: Bruno Victal <brunovictal at outlook.com>
AuthorDate: Fri Apr 15 15:30:01 2022 +0100

    dnsmasq: fix jail_mount for serversfile
    
    Fix 'serversfile' option not being jail_mounted by the init script.
    
    Signed-off-by: Bruno Victal <brunovictal at outlook.com>
    (cherry picked from commit 0276fab64933dc42bad865974dc224e2672f99fe)
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 040ceaea2f..c4ca3eb2db 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -972,7 +972,14 @@ dnsmasq_start()
 	config_list_foreach "$cfg" "addnhosts" append_addnhosts
 	config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
 	append_parm "$cfg" "leasefile" "--dhcp-leasefile" "/tmp/dhcp.leases"
-	append_parm "$cfg" "serversfile" "--servers-file"
+
+	local serversfile
+	config_get serversfile "$cfg" "serversfile"
+	[ -n "$serversfile" ] && {
+		xappend "--servers-file=$serversfile"
+		append EXTRA_MOUNT "$serversfile"
+	}
+
 	append_parm "$cfg" "tftp_root" "--tftp-root"
 	append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
 	append_parm "$cfg" "local_ttl" "--local-ttl"




More information about the lede-commits mailing list