aboutsummaryrefslogtreecommitdiffstats
path: root/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'network-scripts')
-rw-r--r--network-scripts/network-functions3
1 files changed, 3 insertions, 0 deletions
diff --git a/network-scripts/network-functions b/network-scripts/network-functions
index 99096bd8..332115b8 100644
--- a/network-scripts/network-functions
+++ b/network-scripts/network-functions
@@ -622,6 +622,8 @@ is_bonding_device ()
# Invoke this when /etc/resolv.conf has changed:
change_resolv_conf ()
{
+ oldumask=$(umask)
+ umask 022
s=$(/bin/grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null)
if [ $# -gt 1 ]; then
if [ "x$s" != "x" ]; then
@@ -657,6 +659,7 @@ change_resolv_conf ()
/usr/bin/logger -p local7.notice -t "NET" -i "$0 : updated /etc/resolv.conf"
[ -e /run/nscd/socket ] && /usr/sbin/nscd -i hosts # invalidate cache
fi
+ umask "$oldumask"
return $r
}