Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2001 00:50:01 -0800 (PST)
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/32552: broken configuration option in rc.conf
Message-ID:  <200112060850.fB68o1Y20399@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: Ruslan Ermilov <ru@FreeBSD.ORG>
To: "Crist J . Clark" <cjc@FreeBSD.ORG>
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




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