commit d19aaa2f5697e787214b1762a710fd05e3fc28d0
parent 7420e9bf38939da9fe9086bb3041dee5a5d680fe
Author: oblique <psyberbits@gmail.com>
Date: Mon, 17 Aug 2015 20:16:26 +0300
Make dnsmasq.conf readable from everyone
Fix #103
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/create_ap b/create_ap
@@ -1509,6 +1509,7 @@ fi
if [[ "$SHARE_METHOD" == "bridge" ]]; then
echo "bridge=${BRIDGE_IFACE}" >> $CONFDIR/hostapd.conf
else
+ umask 0033
# dnsmasq config (dhcp + dns)
DNSMASQ_VER=$(dnsmasq -v | grep -m1 -oE '[0-9]+(\.[0-9]+)*\.[0-9]+')
version_cmp $DNSMASQ_VER 2.63
@@ -1524,6 +1525,7 @@ dhcp-range=${GATEWAY%.*}.1,${GATEWAY%.*}.254,255.255.255.0,24h
dhcp-option=option:router,${GATEWAY}
EOF
[[ $ETC_HOSTS -eq 0 ]] && echo no-hosts >> $CONFDIR/dnsmasq.conf
+ umask $SCRIPT_UMASK
fi
# initialize WiFi interface