From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net From: Christian Neukirchen Date: Sat, 27 Sep 2014 16:40:40 +0200 Message-ID: <8738bdw2hj.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain In-Reply-To: (Russ Cox's message of "Fri, 26 Sep 2014 11:54:46 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Subject: Re: [9fans] shell functions Topicbox-Message-UUID: 174ce02a-ead9-11e9-9d60-3106f5b1d025 Russ Cox writes: > Thanks to name space hygiene on td's part, the rc function space and the > CGI variable space do not overlap, so rc already has no possible > interaction with CGI, which is as it should be. I don't think it is super > important to try to make rc defend against malicious environments, any more > than it is to make it somehow defend against malicious $paths. If those are > security-relevant, you've already lost. The problem could be completely avoided if the '{}' were implicit, that is, store fn foo { echo bar } as fn#foo=echo bar (Also, I heard Research Unix v8 sh(1) stored functions in the environment as "foo(){ ... }", i.e. without =. So this never clashes with any variable. Not sure if that works portably enough for plan9port, though.) -- Christian Neukirchen http://chneukirchen.org