Bug 708508 - /etc/resolv.conf different depending on the order of "search" and "domain" entries
Summary: /etc/resolv.conf different depending on the order of "search" and "domain" en...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: vpnc
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Christian Krause
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-27 20:39 UTC by dann
Modified: 2012-08-06 20:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---


Attachments (Terms of Use)

Description dann 2011-05-27 20:39:01 UTC
Description of problem:
Say the original contents of /etc/resolve.conf are:
domain foo.bar.baz
search foo.bar.baz

after connecting to the VPN with vpnc 
the contents are:

domain domain_from_vpn
search foo.bar.baz

i.e. the "search" line is unchanged after connecting to the VPN, even though the VPN tries to set it.  Connecting to the same VPN using NetworkManager with the vpnc backend works as expected.

But it the originally /etc/resolve.conf has the two lines swapped:
search foo.bar.baz
domain foo.bar.baz

after connecting with vpnc /etc/resolve.conf will look like this:
search search_from_vpn foo.bar.baz
domain domain_from_vpn

So here the "search" line is set correctly.

The problem is in /etc/vpnc/vpnc-script in the function "modify_resolvconf_generic"

if the "domain" line comes first the 
"domain*)" case will overwrite
"CISCO_DEF_DOMAIN" to be empty

so later when the "search" line is parsed it won't be added to the "search" line.

Version-Release number of selected component (if applicable):
vpnc-0.5.3-9.fc15.i686

Comment 1 Richard W.M. Jones 2011-05-31 08:06:02 UTC
I'm only maintaining the vpnc packaging in Fedora.  This
is better either with a patch to fix the problem, or taking
it upstream (although "upstream" for vpnc has been very
non-existent).

Comment 2 dann 2011-05-31 15:42:16 UTC
(In reply to comment #1)
> I'm only maintaining the vpnc packaging in Fedora.  This
> is better either with a patch to fix the problem,

Here is one that seems to work fine for me:

--- vpnc-script.orig    2011-02-07 18:48:51.000000000 -0800
+++ vpnc-script 2011-05-31 08:39:55.000000000 -0700
@@ -312,8 +312,11 @@
                                fi
                                ;;
                        search*)
-                               if [ -n "$CISCO_DEF_DOMAIN" ]; then
-                                       LINE="$LINE $CISCO_DEF_DOMAIN"
+                               # Deal with the case where both
+                               # "search" and "domain" lines are
+                               # present, and "domain" comes first.
+                               if [ -n "$CISCO_DEF_DOMAIN" -o -z "$CISCO_DEF_DOMAIN" -a -n "$CISCO_DEF_DOMAIN_ORIG" ]; then
+                                       LINE="$LINE $CISCO_DEF_DOMAIN_ORIG"
                                        CISCO_DEF_DOMAIN=""
                                fi
                                ;;

Comment 3 Richard W.M. Jones 2011-05-31 15:51:35 UTC
David Woodhouse is the person who maintains the script
I think.  I've CC'd him on this bug.  See comment 2 above.

Comment 4 Fedora Admin XMLRPC Client 2011-08-31 00:43:34 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora End Of Life 2012-08-06 20:00:36 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Fedora End Of Life 2012-08-06 20:01:20 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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