From owner-freebsd-bugs Wed Dec 5 23:20: 9 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0708B37B419 for ; Wed, 5 Dec 2001 23:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fB67K1g06698; Wed, 5 Dec 2001 23:20:02 -0800 (PST) (envelope-from gnats) Date: Wed, 5 Dec 2001 23:20:02 -0800 (PST) Message-Id: <200112060720.fB67K1g06698@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Crist J . Clark" Subject: Re: conf/32552: broken configuration option in rc.conf Reply-To: "Crist J . Clark" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR conf/32552; it has been noted by GNATS. From: "Crist J . Clark" To: Gleb Smirnoff 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