Date: Wed, 26 Apr 2000 22:31:27 +0200 From: Neil Blakey-Milner <nbm@mithrandr.moria.org> To: Doug Barton <Doug@gorean.org> Cc: freebsd-hackers@freebsd.org, adrian@creative.net.au Subject: Re: Safe sourcing of rc files Message-ID: <20000426223127.A20023@mithrandr.moria.org> In-Reply-To: <20000419165123.A59794@mithrandr.moria.org>; from nbm@mithrandr.moria.org 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 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. Consider this a request for review and comment. Neil -- Neil Blakey-Milner Hacker In Chief, Sunesi Clinical Systems nbm@mithrandr.moria.org 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?20000426223127.A20023>