From owner-cvs-src@FreeBSD.ORG Mon Jun 20 17:48:02 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8922216A41C; Mon, 20 Jun 2005 17:48:02 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 445A443D4C; Mon, 20 Jun 2005 17:48:02 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j5KHm0nE004474; Mon, 20 Jun 2005 13:48:01 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <20050620094103.GB54301@cat.robbins.dropbear.id.au> References: <200506200314.j5K3EUtt089472@repoman.freebsd.org> <20050620094103.GB54301@cat.robbins.dropbear.id.au> Date: Mon, 20 Jun 2005 13:47:59 -0400 To: Tim Robbins From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.4 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/env env.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2005 17:48:02 -0000 At 7:41 PM +1000 6/20/05, Tim Robbins wrote: >On Mon, Jun 20, 2005, Garance A Drosehn wrote: > > gad 2005-06-20 03:14:29 UTC >> >> FreeBSD src repository >> >> Modified files: >> usr.bin/env env.c >> Log: > > If the `utility' specified starts with a '/' character, then > > execute it without checking it for an equals-sign. If it > > starts with a slash, then it cannot be a request to set the > > value of a valid environment variable. > >This is not strictly correct: > > The value of an environment variable is a string of characters. ... > These strings have the form name=value; names shall not contain > the character '='. For values to be portable across systems > conforming to IEEE Std 1003.1-2001, the value shall be composed > of characters from the portable character set (except NUL and as > indicated below). Ah. I jumped to the wrong conclusion based on the description of setting environment variables in the man page for 'sh'. Neither sh nor bash allow you to set /SOMEVAR=YES. setenv in csh seems to let you set a value, but then it complains 'Illegal variable name' if you try to reference it... >Also, please be careful when adding new non-standard options and >features; they tend to stick around forever. These *are* intended to stick around forever. In fact, they are designed in such a way that other OS's could pick up the changes. For the benefit of anyone reading this and considering similar changes, note that I did ask on -arch before adding these features (well, except for the '/' check). No one complained. re@ was asked before these commits were made. I tested this on three platforms before making the commit and I compiled it on two more. I *am* careful, and am somewhat annoyed that you feel you had to tell me to be careful after I had spent so much time looking for feedback before making most of these changes... How much "more careful" does a guy have to get? No, wait, don't answer that!! This is about as careful as I intend to get! :-) But I wouldn't mind to undo the '/' check, if people think that's a problem. I only came up with that idea just before I was ready to commit, while I was stealing lines from the 'sh' man page... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA