Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2000 00:43:29 -0700
From:      Doug Barton <DougB@gorean.org>
To:        Neil Blakey-Milner <nbm@mithrandr.moria.org>
Cc:        Doug Barton <Doug@gorean.org>, freebsd-hackers@freebsd.org, adrian@creative.net.au
Subject:   Re: Safe sourcing of rc files
Message-ID:  <3907EFA1.3D31D221@gorean.org>
References:  <38F17E7A.5892318A@gorean.org> <20000419165123.A59794@mithrandr.moria.org> <20000426223127.A20023@mithrandr.moria.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Neil Blakey-Milner wrote:
> 
> On Wed 2000-04-19 (16:51), Neil Blakey-Milner wrote:
> > I have another idea:  We make a sh script named "rcsource" or whatever,
> > which we source when we want to have the rc environment, stealing your
> > code maliciously:
> >
> > /--
> > sourcercs_sourced_files=
> > sourcercs ( ) {
> >         local rc_conf_files
> >         for i in $*; do
> >                 case "${sourcercs_sourced_files}" in
> >                 *:$i:*)
> >                         ;;
> >                 *)
> >                         sourcercs_sourced_files="${sourcercs_sourced_files}:$i:"
> >                         echo $i
> >                         if [ -r $i ]; then
> >                                 . $i
> >                                 sourcercs ${rc_conf_files}
> >                         fi
> >                         ;;
> >                 esac
> >         done
> > }
> > sourcercs /etc/defaults/rc.conf
> > \--
> 
> Unless someone comes back with negative feedback, I'll be pushing for a
> commit for this (and all that depend on this change) on the weekend.

	Please don't take this the wrong way, but commit what exactly? All you've
described is an idea. Before anyone could even test your idea, you'd have
to have much more concrete work to share. Have you done any actual testing
of your concept? Do you have a patchset that others can test in varying
conditions? I haven't commented further on your idea because without some
solid implementation details it's impossible to discuss further. I think
there are some holes in your concept of being able to redefine
$rc_conf_files for one thing. Keep in mind that you have to source
/etc/defaults/rc.conf first, then do whatever gymnastics you want to do
with the other files. Can you demonstrate a mechanism that accomplishes
this?

	As for comments in general, I do not see the value in making a seperate
script file out of the bit that does the sourcing of the rc.conf files for
the current implementation. I have heard several vague plans for some
future uses of rc.conf, but those are hard to evaluate in the absence of
detail as well. :)

Doug


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3907EFA1.3D31D221>