From owner-freebsd-bugs Wed Jun 12 11:10:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D8F5337B408 for ; Wed, 12 Jun 2002 11:10:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5CIA1C88330; Wed, 12 Jun 2002 11:10:01 -0700 (PDT) (envelope-from gnats) Received: from gilliam.users.flyingcroc.net (gilliam.users.flyingcroc.net [207.246.128.2]) by hub.freebsd.org (Postfix) with ESMTP id 5982337B401 for ; Wed, 12 Jun 2002 11:08:28 -0700 (PDT) Received: from unx48.staff.flyingcroc.net (unx48.staff.flyingcroc.net [207.246.150.48]) by gilliam.users.flyingcroc.net (8.9.3/8.9.3) with SMTP id LAA58614 for ; Wed, 12 Jun 2002 11:08:28 -0700 (PDT) Received: (qmail 82492 invoked by uid 1001); 12 Jun 2002 18:08:27 -0000 Message-Id: <20020612180827.82491.qmail@unx48.staff.flyingcroc.net> Date: 12 Jun 2002 18:08:27 -0000 From: Joe Kelsey Reply-To: Joe Kelsey To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/39198: sh aborts on variables with periods Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39198 >Category: bin >Synopsis: sh aborts on variables with periods >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 12 11:10:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Joe Kelsey >Release: FreeBSD 4.6-RC i386 >Organization: >Environment: System: FreeBSD unx48.staff.flyingcroc.net 4.6-RC FreeBSD 4.6-RC #11: Wed Jun 12 08:37:42 PDT 2002 joek@unx48.staff.flyingcroc.net:/usr/obj/usr/src/sys/UNX48 i386 >Description: /bin/sh does not gracefully accept variables with periods. ksh93 has a new feature of structured variables. These are variables that behave like C structures. Along with this new feature, where sub-variables are separated by periods, ksh also allows variables to begin with periods. This causes a problem in compatibility. If your login shell is ksh93, and you set ENV=~/.ksh93, then when you su, /bin/sh will try to process your ENV file and issue the error message: Syntax error: Bad substitution. when it tries to process the following line: if [ -n "$KSH_VERSION"] || [ -n "${.sh.version}" ] then # ksh-only stuff fi Either /bin/sh has to allow parameters to contain periods or it has to provide a reliable method of detecting /bin/sh versus ksh. >How-To-Repeat: See above >Fix: Change the is_name and is_in_name macros to allow periods in addition to underscores. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message