busybox/shell
Eric Andersen 8e139871fe Patch from Stewart Brodie <stewart.brodie@pace.co.uk> to fix ash:
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.
2002-07-04 00:19:46 +00:00
..
ash.c Patch from Stewart Brodie <stewart.brodie@pace.co.uk> to fix ash: 2002-07-04 00:19:46 +00:00
cmdedit.c Scrub pwd.h and grp.h handling so we don't have to play any 2002-07-03 23:19:26 +00:00
cmdedit.h This is vodz' latest patch. Sorry it took so long... 2001-07-17 01:12:36 +00:00
config.in Make private ash config options be public 2002-01-09 15:37:36 +00:00
hush.c Nice patch from Wolfgang Denk <wd@denx.de> to provide hush with 2002-04-13 12:33:41 +00:00
lash.c Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar> 2002-06-06 13:33:01 +00:00
Makefile Completely rework the config system so that it no longer annoys me to work on 2002-04-12 12:05:57 +00:00
Makefile.in Completely rework the config system so that it no longer annoys me to work on 2002-04-12 12:05:57 +00:00
msh.c Ensure that getenv("PATH") stays current, since otherwise cmdedit 2002-04-26 23:40:09 +00:00