aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-05 05:24:12 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-05 05:24:12 +0000
commit8df319b2139d292238c3b97f5551ccac6957d394 (patch)
tree036cd05b59e88142dd2e4e2c17272407adfcb37b
parented8495990a923910deeddd0aa5bda0ed1cbc6747 (diff)
downloadbusybox-w32-8df319b2139d292238c3b97f5551ccac6957d394.tar.gz
busybox-w32-8df319b2139d292238c3b97f5551ccac6957d394.tar.bz2
busybox-w32-8df319b2139d292238c3b97f5551ccac6957d394.zip
A bit of testing today showed that ASH_BBAPPS_AS_BUILTINS was
totally breaking the shell. Simple thinge like 'FOO=100' caused it to segfault. It turns out that disabling "bltincmd" is a very bad idea. -Erik
-rw-r--r--ash.c8
-rw-r--r--shell/ash.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/ash.c b/ash.c
index 489ccaa95..e7f351608 100644
--- a/ash.c
+++ b/ash.c
@@ -1638,9 +1638,7 @@ static int bgcmd (int, char **);
1638static int fgcmd (int, char **); 1638static int fgcmd (int, char **);
1639static int killcmd (int, char **); 1639static int killcmd (int, char **);
1640#endif 1640#endif
1641#ifdef ASH_BBAPPS_AS_BUILTINS
1642static int bltincmd (int, char **); 1641static int bltincmd (int, char **);
1643#endif
1644static int cdcmd (int, char **); 1642static int cdcmd (int, char **);
1645static int breakcmd (int, char **); 1643static int breakcmd (int, char **);
1646#ifdef ASH_CMDCMD 1644#ifdef ASH_CMDCMD
@@ -1727,9 +1725,7 @@ static const struct builtincmd builtincmds[] = {
1727 { BUILTIN_REGULAR "bg", bgcmd }, 1725 { BUILTIN_REGULAR "bg", bgcmd },
1728#endif 1726#endif
1729 { BUILTIN_SPECIAL "break", breakcmd }, 1727 { BUILTIN_SPECIAL "break", breakcmd },
1730#ifdef ASH_BBAPPS_AS_BUILTINS 1728 { BUILTIN_SPECIAL "builtin", bltincmd }, /* Do not disable this builtin ever or bad things happen */
1731 { BUILTIN_SPECIAL "builtin", bltincmd },
1732#endif
1733 { BUILTIN_REGULAR "cd", cdcmd }, 1729 { BUILTIN_REGULAR "cd", cdcmd },
1734#ifdef ASH_BBAPPS_AS_BUILTINS 1730#ifdef ASH_BBAPPS_AS_BUILTINS
1735 { BUILTIN_NOSPEC "chdir", cdcmd }, 1731 { BUILTIN_NOSPEC "chdir", cdcmd },
@@ -13532,7 +13528,7 @@ findvar(struct var **vpp, const char *name)
13532/* 13528/*
13533 * Copyright (c) 1999 Herbert Xu <herbert@debian.org> 13529 * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
13534 * This file contains code for the times builtin. 13530 * This file contains code for the times builtin.
13535 * $Id: ash.c,v 1.4 2001/07/02 17:27:21 andersen Exp $ 13531 * $Id: ash.c,v 1.5 2001/07/05 05:24:12 andersen Exp $
13536 */ 13532 */
13537static int timescmd (int argc, char **argv) 13533static int timescmd (int argc, char **argv)
13538{ 13534{
diff --git a/shell/ash.c b/shell/ash.c
index 489ccaa95..e7f351608 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -1638,9 +1638,7 @@ static int bgcmd (int, char **);
1638static int fgcmd (int, char **); 1638static int fgcmd (int, char **);
1639static int killcmd (int, char **); 1639static int killcmd (int, char **);
1640#endif 1640#endif
1641#ifdef ASH_BBAPPS_AS_BUILTINS
1642static int bltincmd (int, char **); 1641static int bltincmd (int, char **);
1643#endif
1644static int cdcmd (int, char **); 1642static int cdcmd (int, char **);
1645static int breakcmd (int, char **); 1643static int breakcmd (int, char **);
1646#ifdef ASH_CMDCMD 1644#ifdef ASH_CMDCMD
@@ -1727,9 +1725,7 @@ static const struct builtincmd builtincmds[] = {
1727 { BUILTIN_REGULAR "bg", bgcmd }, 1725 { BUILTIN_REGULAR "bg", bgcmd },
1728#endif 1726#endif
1729 { BUILTIN_SPECIAL "break", breakcmd }, 1727 { BUILTIN_SPECIAL "break", breakcmd },
1730#ifdef ASH_BBAPPS_AS_BUILTINS 1728 { BUILTIN_SPECIAL "builtin", bltincmd }, /* Do not disable this builtin ever or bad things happen */
1731 { BUILTIN_SPECIAL "builtin", bltincmd },
1732#endif
1733 { BUILTIN_REGULAR "cd", cdcmd }, 1729 { BUILTIN_REGULAR "cd", cdcmd },
1734#ifdef ASH_BBAPPS_AS_BUILTINS 1730#ifdef ASH_BBAPPS_AS_BUILTINS
1735 { BUILTIN_NOSPEC "chdir", cdcmd }, 1731 { BUILTIN_NOSPEC "chdir", cdcmd },
@@ -13532,7 +13528,7 @@ findvar(struct var **vpp, const char *name)
13532/* 13528/*
13533 * Copyright (c) 1999 Herbert Xu <herbert@debian.org> 13529 * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
13534 * This file contains code for the times builtin. 13530 * This file contains code for the times builtin.
13535 * $Id: ash.c,v 1.4 2001/07/02 17:27:21 andersen Exp $ 13531 * $Id: ash.c,v 1.5 2001/07/05 05:24:12 andersen Exp $
13536 */ 13532 */
13537static int timescmd (int argc, char **argv) 13533static int timescmd (int argc, char **argv)
13538{ 13534{