Bug 9482
Summary: | /etc/resolv.conf created with readonly root permissions | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | smuskiew |
Component: | initscripts | Assignee: | Nalin Dahyabhai <nalin> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-03-20 16:11:59 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
smuskiew
2000-02-16 16:42:12 UTC
Restoring the previous contents of /etc/resolv.conf becomes very difficult if you start mixing multiple PPP interfaces, so it's not something I expect rp3 will be able to do any time soon, if ever. The resolv.conf is modified by the ifup-post script, which takes pains to maintain the existing permissions on the file. If you use chmod to reset the permissions to 0644, does it get changed back to mode 0600 when you bring up a PPP interface? It seems to be ok on preserving permissions if /etc/resolv.conf exists beforehand, but if the file doesn't exist before dialing, the new one it creates gets 600 permissions. What is your umask set to (i.e., what does running "umask" print) when you bring up the interface? The permissions set on new files can never include those in your umask, so if your umask is set to 077, then the file can't be created with permissions greater than 0600. "umask" for root (right before invoking rp3) is '022'. Also I have confirmed that if rp3 is run when no /etc/resolv.conf exists, the created file gets permissions 600. But if it previously existed, the permissions are correctly preserved. Ugh. As far as I can tell, rp3 and wvdial never directly modify this file, and leave it to the initscripts package's scripts to do the work. Initscripts doesn't modify the file permissions either way, so files that get created get the default permissions, and permissions on pre-existing files remain unchanged. I suspect that somewhere in the whole rp3->wvdial->ifup->ifup-post chain of execution something is changing the default umask to 077. Putting a fix into initscripts is probably the best way to work around the problem. Fixed in initscripts-5.02-1. |