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
This commit is contained in:
Eric Andersen 2001-07-05 05:24:12 +00:00
parent ed8495990a
commit 8df319b213
2 changed files with 4 additions and 12 deletions

8
ash.c
View File

@ -1638,9 +1638,7 @@ static int bgcmd (int, char **);
static int fgcmd (int, char **); static int fgcmd (int, char **);
static int killcmd (int, char **); static int killcmd (int, char **);
#endif #endif
#ifdef ASH_BBAPPS_AS_BUILTINS
static int bltincmd (int, char **); static int bltincmd (int, char **);
#endif
static int cdcmd (int, char **); static int cdcmd (int, char **);
static int breakcmd (int, char **); static int breakcmd (int, char **);
#ifdef ASH_CMDCMD #ifdef ASH_CMDCMD
@ -1727,9 +1725,7 @@ static const struct builtincmd builtincmds[] = {
{ BUILTIN_REGULAR "bg", bgcmd }, { BUILTIN_REGULAR "bg", bgcmd },
#endif #endif
{ BUILTIN_SPECIAL "break", breakcmd }, { BUILTIN_SPECIAL "break", breakcmd },
#ifdef ASH_BBAPPS_AS_BUILTINS { BUILTIN_SPECIAL "builtin", bltincmd }, /* Do not disable this builtin ever or bad things happen */
{ BUILTIN_SPECIAL "builtin", bltincmd },
#endif
{ BUILTIN_REGULAR "cd", cdcmd }, { BUILTIN_REGULAR "cd", cdcmd },
#ifdef ASH_BBAPPS_AS_BUILTINS #ifdef ASH_BBAPPS_AS_BUILTINS
{ BUILTIN_NOSPEC "chdir", cdcmd }, { BUILTIN_NOSPEC "chdir", cdcmd },
@ -13532,7 +13528,7 @@ findvar(struct var **vpp, const char *name)
/* /*
* Copyright (c) 1999 Herbert Xu <herbert@debian.org> * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
* This file contains code for the times builtin. * This file contains code for the times builtin.
* $Id: ash.c,v 1.4 2001/07/02 17:27:21 andersen Exp $ * $Id: ash.c,v 1.5 2001/07/05 05:24:12 andersen Exp $
*/ */
static int timescmd (int argc, char **argv) static int timescmd (int argc, char **argv)
{ {

View File

@ -1638,9 +1638,7 @@ static int bgcmd (int, char **);
static int fgcmd (int, char **); static int fgcmd (int, char **);
static int killcmd (int, char **); static int killcmd (int, char **);
#endif #endif
#ifdef ASH_BBAPPS_AS_BUILTINS
static int bltincmd (int, char **); static int bltincmd (int, char **);
#endif
static int cdcmd (int, char **); static int cdcmd (int, char **);
static int breakcmd (int, char **); static int breakcmd (int, char **);
#ifdef ASH_CMDCMD #ifdef ASH_CMDCMD
@ -1727,9 +1725,7 @@ static const struct builtincmd builtincmds[] = {
{ BUILTIN_REGULAR "bg", bgcmd }, { BUILTIN_REGULAR "bg", bgcmd },
#endif #endif
{ BUILTIN_SPECIAL "break", breakcmd }, { BUILTIN_SPECIAL "break", breakcmd },
#ifdef ASH_BBAPPS_AS_BUILTINS { BUILTIN_SPECIAL "builtin", bltincmd }, /* Do not disable this builtin ever or bad things happen */
{ BUILTIN_SPECIAL "builtin", bltincmd },
#endif
{ BUILTIN_REGULAR "cd", cdcmd }, { BUILTIN_REGULAR "cd", cdcmd },
#ifdef ASH_BBAPPS_AS_BUILTINS #ifdef ASH_BBAPPS_AS_BUILTINS
{ BUILTIN_NOSPEC "chdir", cdcmd }, { BUILTIN_NOSPEC "chdir", cdcmd },
@ -13532,7 +13528,7 @@ findvar(struct var **vpp, const char *name)
/* /*
* Copyright (c) 1999 Herbert Xu <herbert@debian.org> * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
* This file contains code for the times builtin. * This file contains code for the times builtin.
* $Id: ash.c,v 1.4 2001/07/02 17:27:21 andersen Exp $ * $Id: ash.c,v 1.5 2001/07/05 05:24:12 andersen Exp $
*/ */
static int timescmd (int argc, char **argv) static int timescmd (int argc, char **argv)
{ {