Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jun 2005 08:37:11 +0200 (CEST)
From:      Harti Brandt <hartmut.brandt@dlr.de>
To:        Garance A Drosehn <gad@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Tim Robbins <tjr@FreeBSD.org>
Subject:   Re: cvs commit: src/usr.bin/env env.c
Message-ID:  <20050621083525.H20063@beagle.kn.op.dlr.de>
In-Reply-To: <p06210226bedca69d3945@[128.113.24.47]>
References:  <200506200314.j5K3EUtt089472@repoman.freebsd.org> <20050620094103.GB54301@cat.robbins.dropbear.id.au> <p06210226bedca69d3945@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Jun 2005, Garance A Drosehn wrote:

GAD>At 7:41 PM +1000 6/20/05, Tim Robbins wrote:
GAD>> On Mon, Jun 20, 2005, Garance A Drosehn wrote:
GAD>>  > gad         2005-06-20 03:14:29 UTC
GAD>> > 
GAD>> >    FreeBSD src repository
GAD>> > 
GAD>> >    Modified files:
GAD>> >      usr.bin/env          env.c
GAD>> >    Log:
GAD>>  >   If the `utility' specified starts with a '/' character, then
GAD>>  >   execute it without checking it for an equals-sign.  If it
GAD>>  >   starts with a slash, then it cannot be a request to set the
GAD>>  >   value of a valid environment variable.
GAD>> 
GAD>> This is not strictly correct:
GAD>> 
GAD>> 	The value of an environment variable is a string of characters.
GAD>        ...
GAD>> 	These strings have the form name=value; names shall not contain
GAD>> 	the character '='. For values to be portable across systems
GAD>> 	conforming to IEEE Std 1003.1-2001, the value shall be composed
GAD>> 	of characters from the portable character set (except NUL and as
GAD>> 	indicated below).
GAD>
GAD>Ah.  I jumped to the wrong conclusion based on the description of
GAD>setting environment variables in the man page for 'sh'.  Neither
GAD>sh nor bash allow you to set /SOMEVAR=YES.  setenv in csh seems to
GAD>let you set a value, but then it complains 'Illegal variable name'
GAD>if you try to reference it...
GAD>

[snip]

GAD>But I wouldn't mind to undo the '/' check, if people think that's
GAD>a problem.  I only came up with that idea just before I was ready
GAD>to commit, while I was stealing lines from the 'sh' man page...

Yes, please undo.

harti



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050621083525.H20063>