[BusyBox] bug#1252: marked as done (ash needs CONFIG_ASH_ALIAS for environment variables to be parsed correctly)

BusyBox.net bug Tracking System owner at busybox.net
Wed Jul 3 18:46:05 UTC 2002


Your message dated Wed, 3 Jul 2002 18:26:26 -0600
with message-id <20020704002626.GA2424 at codepoet.org>
and subject line [BusyBox] bug#1252: ash needs CONFIG_ASH_ALIAS for environment variables to be parsed correctly
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Erik Andersen
(administrator, BusyBox.net bugs database)

--------------------------------------
Received: (at submit) by bugs.busybox.net; 17 Jun 2002 10:20:55 +0000
>From stewart.brodie at pace.co.uk  Mon Jun 17 04:20:55 2002
Received: from sbrodie.cam.pace.co.uk (host-33-223.pace.co.uk [136.170.33.223])
	by winder.codepoet.org (Postfix) with SMTP id 1328C1577D3
	for <submit at bugs.busybox.net>; Mon, 17 Jun 2002 04:20:53 -0600 (MDT)
Received: from loopback ([127.0.0.1]) by sbrodie.cam.pace.co.uk with SMTP; Mon, 17 Jun 2002 10:18:39 GMT
Date: Mon, 17 Jun 2002 11:17:47 +0100
From: Stewart Brodie <stewart.brodie at pace.co.uk>
Message-ID: <6303f5474b.sbrodie at sbrodie.cam.pace.co.uk>
X-Organization: Pace Micro Technology plc
User-Agent: Messenger-Pro/2.59beta2 (Newsbase/0.61b) (RISC-OS/4.00-Ursula002f)
To: submit at bugs.busybox.net
Subject: ash needs CONFIG_ASH_ALIAS for environment variables to be parsed correctly
X-Editor: Zap, using ZapEmail 0.22 (27 Nov 1998) patch-3
Sender: sbrodie at pace.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Apparently-From: sbrodie at pace.co.uk
X-Posting-Agent: RISC OS Newsbase 0.61b

Package: busybox
Version: 0.61pre
Severity: normal

Specific revision information: busybox/shell/ash.c revision 1.52

When alias support is not configured, ash believes that command parameters
that look like dd's "if=/dev/zero" are requests to set a temporary
environment variable whilst dd is running, even though it appears after the
command name.  This is caused by the re-use of the checkalias global variable
to indicate when both alias checking and environment variable checking.  The
failure to reset this flag is due to the reset action being performed only
inside the feature check CHECK_ASH_ALIAS.  Hence ash works as expected when
aliases are configured in, and fails when not.

Example script using 'date' with different settings of TZ:

# TZ=Europe/London
# export TZ
# date
Thu May 30 17:18:49 BST 2002
# TZ=America/New_York date
Thu May 30 12:19:10 EDT 2002
# date
Thu May 30 17:19:12 BST 2002
# date TZ=America/New_York
Thu May 30 12:19:30 EDT 2002    <----- wrong, should be BST time (or error!)
# date
Thu May 30 17:19:35 BST 2002

Attached is a patch against revision 1.52 of ash.c which moves the checks so
that checkalias is updated regardless of whether CONFIG_ASH_ALIAS is set.
With this patch applied, the command shown above which should generate an
error does generate an error.

I have tested this patch with the 'dd' command too and that now works
correctly.

-- 
Stewart Brodie, Senior Software Engineer
Pace Micro Technology PLC
645 Newmarket Road
Cambridge, CB5 8PB, United Kingdom         WWW: http://www.pacemicro.com/


begin 644 ash.c.diff
M26YD97 at Z(&%S:"YC"CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T*4D-3(&9I;&4Z
M("]V87(O8W9S+V)U<WEB;W at O<VAE;&PO87-H+F,L=@IR971R:65V:6YG(')E
M=FES:6]N(#$N-3(*9&EF9B`M=R`M8R`M<C$N-3(@87-H+F,**BHJ(&%S:"YC
M"38 at 2G5N(#(P,#(@,3(Z,#<Z,C@@+3`P,#`),2XU, at HM+2T@87-H+F,),3<@
M2G5N(#(P,#(@,#DZ-3(Z-#8 at +3`P,#`**BHJ*BHJ*BHJ*BHJ*BHJ"BHJ*B`Y
M.38W+#DY-S0@*BHJ*@H@(')E861T;VME;B at I('L*("`):6YT('0["B`@"BT@
M(VEF9&5F($-/3D9)1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')L96XH87`M/G9A
M;"DL(&%P*3L*+2TM(#$P,#$Y+#$P,#(V("TM+2T*("`)"7T*("`)?2!E;'-E
M(&EF("AC:&5C:V%L:6%S(#T](#(@)B8@:7-A<W-I9VYM96YT*'=O<F1T97AT
M*2D@>PH@(`D);&%S='1O:V5N(#T@="`](%1!4U-)1TX["B`@"7T at 96QS92!I
M9B`H8VAE8VMA;&EA<RD@>PHK("-I9F1E9B!#3TY&24=?05-(7T%,24%3"B`@
M"0EI9B`H(7%U;W1E9FQA9R`F)B`H87`@/2`J7U]L;V]K=7!A;&EA<RAW;W)D
M=&5X="DI("$]($Y53$P@)B8@(2AA<"T^9FQA9R`F($%,24%324Y54T4I*2![
M"B`@"0D):68@*"IA<"T^=F%L*2!["B`@"0D)"7!U<VAS=')I;F<H87`M/G9A
M;"P@<W1R;&5N*&%P+3YV86PI+"!A<"D["BHJ*BHJ*BHJ*BHJ*BHJ*@HJ*BH@
M,3`P,S`L,3`P,S<@*BHJ*@H@(`D)"6-H96-K:W=D(#T@<V%V96-H96-K:W=D
M.PH@(`D)"6=O=&\@=&]P.PH@(`D)?0HM(`D)8VAE8VMA;&EA<R`](#`["B`@
M(V5N9&EF"B`@"7T*("!O=70Z"B`@(VEF9&5F($1%0E5'"BTM+2`Q,#`R."PQ
M,#`S-2`M+2TM"B`@"0D)8VAE8VMK=V0@/2!S879E8VAE8VMK=V0["B`@"0D)
M9V]T;R!T;W`["B`@"0E]"B`@(V5N9&EF"BL@"0EC:&5C:V%L:6%S(#T@,#L*
<("`)?0H@(&]U=#H*("`C:69D968 at 1$5"54<*"@EC
`
end
---------------------------------------
Received: (at 1252-done) by bugs.busybox.net; 4 Jul 2002 00:26:28 +0000
>From andersen at codepoet.org  Wed Jul  3 18:26:28 2002
Received: by winder.codepoet.org (Postfix, from userid 1000)
	id 65D3D1577D3; Wed,  3 Jul 2002 18:26:26 -0600 (MDT)
Date: Wed, 3 Jul 2002 18:26:26 -0600
From: Erik Andersen <andersen at codepoet.org>
To: Stewart Brodie <stewart.brodie at pace.co.uk>,
	1252-done at bugs.busybox.net
Subject: Re: [BusyBox] bug#1252: ash needs CONFIG_ASH_ALIAS for environment variables to be parsed correctly
Message-ID: <20020704002626.GA2424 at codepoet.org>
Reply-To: andersen at codepoet.org
References: <6303f5474b.sbrodie at sbrodie.cam.pace.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6303f5474b.sbrodie at sbrodie.cam.pace.co.uk>
User-Agent: Mutt/1.3.28i
X-Operating-System: Linux 2.4.18-rmk7, Rebel-NetWinder(Intel StrongARM 110 rev 3), 185.95 BogoMips
X-No-Junk-Mail: I do not want to get *any* junk mail.

On Mon Jun 17, 2002 at 11:17:47AM +0100, Stewart Brodie wrote:
> Package: busybox
> Version: 0.61pre
> Severity: normal
> 
> Specific revision information: busybox/shell/ash.c revision 1.52
> 
> When alias support is not configured, ash believes that command parameters
> that look like dd's "if=/dev/zero" are requests to set a temporary
> environment variable whilst dd is running, even though it appears after the
> command name.  This is caused by the re-use of the checkalias global variable
> to indicate when both alias checking and environment variable checking.  The
> failure to reset this flag is due to the reset action being performed only
> inside the feature check CHECK_ASH_ALIAS.  Hence ash works as expected when
> aliases are configured in, and fails when not.
> 
> Example script using 'date' with different settings of TZ:
> 
> # TZ=Europe/London
> # export TZ
> # date
> Thu May 30 17:18:49 BST 2002
> # TZ=America/New_York date
> Thu May 30 12:19:10 EDT 2002
> # date
> Thu May 30 17:19:12 BST 2002
> # date TZ=America/New_York
> Thu May 30 12:19:30 EDT 2002    <----- wrong, should be BST time (or error!)
> # date
> Thu May 30 17:19:35 BST 2002
> 
> Attached is a patch against revision 1.52 of ash.c which moves the checks so
> that checkalias is updated regardless of whether CONFIG_ASH_ALIAS is set.
> With this patch applied, the command shown above which should generate an
> error does generate an error.
> 
> I have tested this patch with the 'dd' command too and that now works
> correctly.

Patch looks fine.  Applied thanks!

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the busybox mailing list