Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2000 01:14:08 +0800
From:      Adrian Chadd <adrian@creative.net.au>
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:  <20000420011407.A81472@ewok.creative.net.au>
In-Reply-To: <20000419165123.A59794@mithrandr.moria.org>; from Neil Blakey-Milner on Wed, Apr 19, 2000 at 04:51:24PM %2B0200
References:  <38F17E7A.5892318A@gorean.org> <20000419165123.A59794@mithrandr.moria.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 19, 2000, Neil Blakey-Milner wrote:
> On Mon 2000-04-10 (00:10), Doug Barton wrote:
> > +if [ -z "${sourcercs_defined}" ]; then
> > +        sourcercs_defined=yes
> > +        sourcercs ( ) {
> > +                local sourced_files
> > +                for i in ${rc_conf_files}; do
> > +                        case "${sourced_files}" in
> > +                        *:$i:*)
> > +                                ;;
> > +                        *)
> > +                                sourced_files="${sourced_files}:$i:"
> > +                                if [ -r $i ]; then
> > +                                        . $i
> > +                                fi
> > +                                ;;
> > +                        esac
> > +                done
> > +        }
> > +fi
> 
> 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:

Yup, thats what I proposed, and this code is basically what I had hacked
at my end. :)




Adrian



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?20000420011407.A81472>