Russ Cox <[email protected]> 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 <[email protected]> http://chneukirchen.org