Force permission on /etc/resolv.dnsmasq.conf to fix an issue on some setup with umask=027

This commit is contained in:
Alexandre Aubin 2021-11-27 16:33:29 +01:00
parent a0344d44bd
commit 5881938c69

View file

@ -61,6 +61,9 @@ do_pre_regen() {
do_post_regen() {
regen_conf_files=$1
# Force permission (to cover some edge cases where root's umask is like 027 and then dnsmasq cant read this file)
chown 644 /etc/resolv.dnsmasq.conf
# Fuck it, those domain/search entries from dhclient are usually annoying
# lying shit from the ISP trying to MiTM
if grep -q -E "^ *(domain|search)" /run/resolvconf/resolv.conf; then