From owner-freebsd-bugs Thu Dec 6 0:50: 6 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 D982137B417 for ; Thu, 6 Dec 2001 00:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fB68o1Y20399; Thu, 6 Dec 2001 00:50:01 -0800 (PST) (envelope-from gnats) Date: Thu, 6 Dec 2001 00:50:01 -0800 (PST) Message-Id: <200112060850.fB68o1Y20399@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: conf/32552: broken configuration option in rc.conf Reply-To: Ruslan Ermilov 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: Ruslan Ermilov To: "Crist J . Clark" Cc: bug-followup@FreeBSD.ORG Subject: Re: conf/32552: broken configuration option in rc.conf Date: Thu, 6 Dec 2001 10:48:08 +0200 On Wed, Dec 05, 2001 at 11:20:02PM -0800, Crist J . Clark wrote: > 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. > Index: rc.network =================================================================== RCS file: /home/ncvs/src/etc/rc.network,v retrieving revision 1.115 diff -u -p -r1.115 rc.network --- rc.network 2001/11/24 23:41:32 1.115 +++ rc.network 2001/12/06 08:46:43 @@ -808,7 +808,9 @@ network_pass3() { pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" fi echo -n ' pppoed'; + _opts=$-; set -f /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + set +f; set -${_opts} ;; esac The ${_opts} is only needed for the case where -f was already set. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message