From barry@lustig.com Mon Nov 22 07:18:37 1999
Return-Path: <barry@lustig.com>
Received: from gate.lustig.com (h08002be407ad.ne.mediaone.net [24.218.222.42])
	by hub.freebsd.org (Postfix) with SMTP id BB71B14E37
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 22 Nov 1999 07:18:34 -0800 (PST)
	(envelope-from barry@lustig.com)
Received: (qmail 11202 invoked by uid 0); 22 Nov 1999 15:17:15 -0000
Message-Id: <19991122151715.11201.qmail@gate.lustig.com>
Date: 22 Nov 1999 15:17:15 -0000
From: barry@lustig.com
Reply-To: barry@lustig.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: /sbin/dhclient-script ignores resolv.conf hooks
X-Send-Pr-Version: 3.2

>Number:         15046
>Category:       bin
>Synopsis:       /sbin/dhclient-script ignores resolv.conf hooks
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 22 07:20:00 PST 1999
>Closed-Date:    Fri Nov 10 09:21:38 PST 2000
>Last-Modified:  Fri Nov 10 09:21:58 PST 2000
>Originator:     Barry Lustig
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
>Environment:

	FreeBSD 3.3-STABLE cvsupped as of Nov 20, 1999.

>Description:

	/sbin/dhclient-script ignores the make_resolv_conf hooks during
	processing.

Here is the first instance from /sbin/dhclient-script:

	echo search $new_domain_name >/etc/resolv.conf
	for nameserver in $new_domain_name_servers; do
	  echo nameserver $nameserver >>/etc/resolv.conf
	done

And here is the second:

        echo search $new_domain_name >/etc/resolv.conf.std
        for nameserver in $new_domain_name_servers; do
	  echo nameserver $nameserver >>/etc/resolv.conf.std
        done
        if [ -f /etc/resolv.conf ]; then
	  rm -f /etc/resolv.conf
        fi
        mv /etc/resolv.conf.std /etc/resolv.conf


>How-To-Repeat:

	Run dhclient and see /etc/resolv.conf get overwritten even
	though there is a make_resolv_conf hook defined

>Fix:
	
	


>Release-Note:
>Audit-Trail:

From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mikko@rsasecurity.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/15046: /sbin/dhclient-script ignores resolv.conf hooks
Date: Thu, 25 Nov 1999 15:13:41 +0100 (MET)

 I ran into the same thing.  Fixed by:
 
 --- /sbin/dhclient-script       Mon Nov 22 14:52:11 1999
 +++ dhclient-script     Thu Nov 25 14:05:49 1999
 @@ -129,10 +129,7 @@
      ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
      route add $alias_ip_address 127.0.0.1
    fi
 -  echo search $new_domain_name >/etc/resolv.conf
 -  for nameserver in $new_domain_name_servers; do
 -    echo nameserver $nameserver >>/etc/resolv.conf
 -  done
 +  make_resolv_conf
    exit_with_hooks 0
  fi
  
 @@ -190,14 +187,7 @@
         route add $0 $1
         shift; shift
        done
 -      echo search $new_domain_name >/etc/resolv.conf.std
 -      for nameserver in $new_domain_name_servers; do
 -       echo nameserver $nameserver >>/etc/resolv.conf.std
 -      done
 -      if [ -f /etc/resolv.conf ]; then
 -       rm -f /etc/resolv.conf
 -      fi
 -      mv /etc/resolv.conf.std /etc/resolv.conf
 +      make_resolv_conf
        exit_with_hooks 0
      fi
    fi
 
 
 
  Mikko Tyo"la"ja"rvi_____________________________________mikko@rsasecurity.com
  RSA Security
 
 

From: "Patrick Bihan-Faou" <patrick@mindstep.com>
To: <freebsd-gnats-submit@freebsd.org>, <barry@lustig.com>
Cc:  
Subject: Re: bin/15046: /sbin/dhclient-script ignores resolv.conf hooks
Date: Thu, 9 Dec 1999 01:40:32 -0500

 Hi,
 
 The dhclient-script replacement submitted in PR bin/15342 fixes that
 problem.
 
 Patrick.
 
 --
 www.mindstep.com
 
 
 
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Thu Jul 13 22:52:06 PDT 2000 
Responsible-Changed-Why:  
all the other DHCP ones are assigned to me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=15046 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Fri Nov 10 09:21:38 PST 2000 
State-Changed-Why:  
A change simular to this was committed, but I forgot to close the PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=15046 
>Unformatted:
