[Bug 1086336] [NEW] kppp not resolvconf-aware; appears to clobber /etc/resolvconf
Thomas Hood
1086336 at bugs.launchpad.net
Tue Dec 4 11:25:34 UTC 2012
Public bug reported:
Looking at the kdenetwork 4.9.2-0ubuntu2.1 source code I see the
following code snippets in kppp/connect.cpp starting at line 1419:
// Replace the DNS domain entry in the /etc/resolv.conf file and
// disable the nameserver entries if option is enabled
void add_domain(const QString &domain) {
// adds the DNS entries in the /etc/resolv.conf file
void adddns()
{
// remove the dns entries from the /etc/resolv.conf file
void removedns() {
The code inside the functions writes directly to /etc/resolv.conf.
Nowhere is there a check for the presence of /sbin/resolvconf.
When /sbin/resolvconf is present and executable, and thus in Ubuntu
12.04 and later, it is not permitted to write directly to
/etc/resolv.conf. Programs that want to make changes to resolv.conf must
interface with /sbin/resolvconf which takes care of adding material to
and removing material from resolv.conf. Please see
/usr/share/doc/resolvconf/README.gz for more instructions.
It looks as if kppp writes to /etc/resolv.conf and does not mv
/etc/resolv.conf. So if /etc/resolv.conf is a symbolic link, as is
normally the case when resolvconf is installed, then kppp will write
through the link to /run/resolvconf/resolv.conf. Then the next time
resolvconf updates this file, kppp's changes will be obliterated.
I haven't tested kppp so I don't know whether the code in question is
actually executed. If I have a chance I'll test it.
** Affects: kdenetwork (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kdenetwork in Ubuntu.
https://bugs.launchpad.net/bugs/1086336
Title:
kppp not resolvconf-aware; appears to clobber /etc/resolvconf
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kdenetwork/+bug/1086336/+subscriptions
More information about the kubuntu-bugs
mailing list