wicd-daemon.py clobbers /etc/resolv.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wicd (Debian) |
Fix Released
|
Unknown
|
|||
wicd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In wicd-daemon.py the main() function backs up and restores /etc/resolv.conf. To back up it does
shutil.
which is like the following shell command.
cp -p /etc/resolv.conf path/resolv.
Note that if /etc/resolv.conf is a symbolic link to another file, the shutil.copy2() copies the contents to the target; it does not create an equivalent symbolic link at the target.
To restore, it does
shutil.
which is like the following.
mv path/resolv.
If /etc/resolv.conf was a symbolic link before the backup-and-restore sequence then afterwards it is a plain file with the contents of the target of that symlink. Put more bluntly, it clobbers the symlink.
Resolvconf, which is part of the Ubuntu base install since 12.04, makes use of a symbolic link /etc/resolv.conf -> ../run/
I was just reading the wicd code and this bug report arises from that reading, not from testing. But even if the code in question isn't currently executed it should be fixed.
Changed in wicd (Debian): | |
status: | Unknown → Confirmed |
Changed in wicd (Debian): | |
status: | Confirmed → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.