diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-07-05 05:24:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-07-05 05:24:12 +0000 |
commit | 8df319b2139d292238c3b97f5551ccac6957d394 (patch) | |
tree | 036cd05b59e88142dd2e4e2c17272407adfcb37b | |
parent | ed8495990a923910deeddd0aa5bda0ed1cbc6747 (diff) | |
download | busybox-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.c | 8 | ||||
-rw-r--r-- | shell/ash.c | 8 |
2 files changed, 4 insertions, 12 deletions
@@ -1638,9 +1638,7 @@ static int bgcmd (int, char **); | |||
1638 | static int fgcmd (int, char **); | 1638 | static int fgcmd (int, char **); |
1639 | static int killcmd (int, char **); | 1639 | static int killcmd (int, char **); |
1640 | #endif | 1640 | #endif |
1641 | #ifdef ASH_BBAPPS_AS_BUILTINS | ||
1642 | static int bltincmd (int, char **); | 1641 | static int bltincmd (int, char **); |
1643 | #endif | ||
1644 | static int cdcmd (int, char **); | 1642 | static int cdcmd (int, char **); |
1645 | static int breakcmd (int, char **); | 1643 | static 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 | */ |
13537 | static int timescmd (int argc, char **argv) | 13533 | static 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 **); | |||
1638 | static int fgcmd (int, char **); | 1638 | static int fgcmd (int, char **); |
1639 | static int killcmd (int, char **); | 1639 | static int killcmd (int, char **); |
1640 | #endif | 1640 | #endif |
1641 | #ifdef ASH_BBAPPS_AS_BUILTINS | ||
1642 | static int bltincmd (int, char **); | 1641 | static int bltincmd (int, char **); |
1643 | #endif | ||
1644 | static int cdcmd (int, char **); | 1642 | static int cdcmd (int, char **); |
1645 | static int breakcmd (int, char **); | 1643 | static 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 | */ |
13537 | static int timescmd (int argc, char **argv) | 13533 | static int timescmd (int argc, char **argv) |
13538 | { | 13534 | { |