Here is a tested patch which implements the requested change.

** Patch added: "Patch to fix the way NM runs resolvconf"
   
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1072341/+attachment/3418504/+files/fix-nm-resolvconf-handling.patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1072341

Title:
  If resolvconf returns an error condition then NM overwrites
  /run/resolvconf/resolv.conf

Status in “network-manager” package in Ubuntu:
  New

Bug description:
  (Arises from discussion here:
  https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1000244/comments/78)

  The code in src/dns-manager/nm-dns-manager.c is essentially the
  following.

          success = dispatch_resolvconf (domain, searches, nameservers, iface, 
error);
          if (success == FALSE)
                  success = update_resolv_conf (domain, searches, nameservers, 
iface, error);

  When resolvconf runs if may or may not return an error. For example,
  if some /etc/resolvconf/update.d/ hook script returns a nonzero status
  then that status is returned by resolvconf to the caller,
  NetworkManager. But as NetworkManager is currently coded, if
  resolvconf returns an error for any reason then NM writes nameserver
  information directly to /etc/resolv.conf, i.e., generally, to
  /run/resolvconf/resolv.conf, clobbering the file that resolvconf has
  just written. This is not appropriate.

  I mentioned this issue ten months ago in comment #30 on bug #324233.

      https://bugs.launchpad.net/ubuntu/+source/network-
  manager/+bug/324233/comments/30

  Although the most serious of the several problems I discussed there
  have been fixed in Quantal, the problem remains that NetworkManager
  does not correctly handle a nonzero exit status returned by
  resolvconf.

  The NM behavior in question dates from the time that resolvconf was an
  optional package in universe which returned nonzero status when
  /etc/resolv.conf failed to be a symbolic link. In Quantal resolvconf
  does not return nonzero status when /etc/resolv.conf fails to be a
  symbolic link. It returns nonzero only when there is some problem,
  e.g., non-writeable filesystem or whatever. NetworkManager should
  probably just report this failure and not immediately proceed to
  overwrite resolvconf's output.

  Instead of the code quoted above, nm-dns-manager.c  should implement
  the following logic.

      IF resolvconf is installed as evidenced by the presence of executable 
file /sbin/resolvconf
      THEN dispatch_resolvconf ()  # Send info to /sbin/resolvconf
      ELSE update_resolv_conf ()  # Write info directly to (the target of) 
/etc/resolv.conf

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1072341/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to