Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 14504 - ifup-post can create unreadable /etc/resolv.conf
ifup-post can create unreadable /etc/resolv.conf
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 2000-07-24 02:41 EDT by Mike Perry
Modified: 2014-03-16 22:14 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-07-24 12:29:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Perry 2000-07-24 02:41:21 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
12:09:39 2000
+++ initscripts-5.00sym/sysconfig/network-scripts/ifup-post     Mon Jul 24
01:38:31 2000
@@ -74,7 +74,10 @@
     # maintain permissions
+    oldmask=`umask`
+    umask 022
     cat $tr > /etc/resolv.conf
+    umask $oldmask
     rm -f $tr
Comment 1 Bill Nottingham 2000-07-24 12:29:48 EDT
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
Comment 2 Bill Nottingham 2000-08-07 00:51:24 EDT
Actually, this has been fixed for a while in rawhide.

Note You need to log in before you can comment on or make changes to this bug.