Red Hat Bugzilla – Bug 14504
ifup-post can create unreadable /etc/resolv.conf
Last modified: 2014-03-16 22:14:59 EDT
When called with an stringent umask (066, for example) ifup-post can create
an unreadable /etc/resolv.conf if one doesn't already exist. Obviously,
this breaks DNS for unpriveledged users. Are there any other config files
created by the if* scripts that have a similar problem? This is the only
one I've noticed so far.
Simply setting the umask before catting to resolv.conf, or chmoding
afterwords will fix this.
diff -ur initscripts-5.00/sysconfig/network-scripts/ifup-post
--- initscripts-5.00/sysconfig/network-scripts/ifup-post Thu Feb 24
+++ initscripts-5.00sym/sysconfig/network-scripts/ifup-post Mon Jul 24
@@ -74,7 +74,10 @@
# maintain permissions
+ umask 022
cat $tr > /etc/resolv.conf
+ umask $oldmask
rm -f $tr
Hm, this will only be the case if resolv.conf isn't
created already, as far as I can tell. We'll get
this change in, but for most cases it should be
Actually, this has been fixed for a while in rawhide.