dnsmasq: add dhcphostsfile to ujail sandbox
authorRuben Jenster <rjenster@gmail.com>
Thu, 23 Mar 2023 10:15:52 +0000 (11:15 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 2 Apr 2023 20:07:27 +0000 (22:07 +0200)
The dhcphostsfile must be mounted into the (ujail) sandbox.
The file can not be accessed without this mount.

Signed-off-by: Ruben Jenster <rjenster@gmail.com>
(cherry picked from commit 936df715de3d33947ce38ca232b05c2bd3ef58f1)

package/network/services/dnsmasq/files/dnsmasq.init

index c4ca3eb2db39d08355ec82904456a54fa8648003..d2bcca46ed4431f8bdfa386bda24cc5a9b22c22e 100755 (executable)
@@ -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
 }