Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2001 23:20:02 -0800 (PST)
From:      "Crist J . Clark" <cjc@FreeBSD.ORG>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/32552: broken configuration option in rc.conf
Message-ID:  <200112060720.fB67K1g06698@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/32552; it has been noted by GNATS.

From: "Crist J . Clark" <cjc@FreeBSD.ORG>
To: Gleb Smirnoff <glebius@rinet.ru>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/32552: broken configuration option in rc.conf
Date: Wed, 5 Dec 2001 23:14:45 -0800

 On Thu, Dec 06, 2001 at 08:58:50AM +0300, Gleb Smirnoff wrote:
 [snip]
 > >Description:
 > 	In /etc/defaults/rc.conf exists option
 > 	pppoed_provider="*". If it is not overriden in /etc/rc.conf,
 > 	it is expanded to the listing of /. So pppoed is invoked
 > 	with option -p COPYRIGHT bin boot ....
 > 
 > >How-To-Repeat:
 > 	Try pppoed_enable="YES" in rc.conf. pppoed will not run on boot.
 > 	If we insert echo in rc.network before /usr/libexec/pppoed,
 > 	then we will see how pppoed_provider is misinterpreted.
 > 
 > >Fix:
 > 	Comment out this line or override it.
 
 That _is_ the intended default, a '*' (see pppoed(8) why that is). The
 problem is the code rc.network doesn't protect it from metacharacter
 expansion.
 
 The easiest way around this I could think of is,
 
 Index: src/etc/rc.network
 ===================================================================
 RCS file: /export/ncvs/src/etc/rc.network,v
 retrieving revision 1.115
 diff -u -r1.115 rc.network
 --- src/etc/rc.network  24 Nov 2001 23:41:32 -0000      1.115
 +++ src/etc/rc.network  6 Dec 2001 07:12:53 -0000
 @@ -804,11 +804,13 @@
  
         case ${pppoed_enable} in
         [Yy][Ee][Ss])
 +               echo -n ' pppoed';
                 if [ -n "${pppoed_provider}" ]; then
 -                       pppoed_flags="${pppoed_flags} -p ${pppoed_provider}"
 +                       /usr/libexec/pppoed ${pppoed_flags} \
 +                           -p "${pppoed_provider}" ${pppoed_interface}
 +               else
 +                       /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface}
                 fi
 -               echo -n ' pppoed';
 -               /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface}
                 ;;
         esac
  
 Not the prettiest, but I think it works. Unless someone has a better
 one, I'll commit it.
 -- 
 "It's always funny until someone gets hurt. Then it's hilarious."
 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112060720.fB67K1g06698>