Skip to content

Commit

Permalink
dnsmasq: fix jail mount in case of ignore_hosts_dir being set
Browse files Browse the repository at this point in the history
Commit a2fcd39 ("dnsmasq: improve init script") broke the existing
handling for hosts_dir. Remove the redundant mount again to fix it.

Reported-by: Hartmut Birr <[email protected]>
Fixes: a2fcd39 ("dnsmasq: improve init script")
Signed-off-by: Daniel Golle <[email protected]>
  • Loading branch information
dangowrt committed Nov 1, 2021
1 parent d7843fd commit a44e4aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions package/network/services/dnsmasq/files/dnsmasq.init
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,8 @@ dnsmasq_start()
xappend "--addn-hosts=$HOSTFILE"
append EXTRA_MOUNT "$HOSTFILE"
else
xappend "--addn-hosts=$(dirname $HOSTFILE)"
append EXTRA_MOUNT "$(dirname $HOSTFILE)"
xappend "--addn-hosts=$HOSTFILE_DIR"
append EXTRA_MOUNT "$HOSTFILE_DIR"
fi
config_list_foreach "$cfg" "addnhosts" append_addnhosts
config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
Expand Down Expand Up @@ -1156,7 +1156,6 @@ dnsmasq_start()
procd_add_jail_mount $EXTRA_MOUNT $RFC6761FILE $TRUSTANCHORSFILE
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
[ "$HOSTFILE_DIR" != "/tmp" ] && procd_add_jail_mount "$HOSTFILE_DIR"
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile

procd_close_instance
Expand Down

0 comments on commit a44e4aa

Please sign in to comment.