Commit Graph

39 Commits

Author SHA1 Message Date
Mike Frysinger
14ff19b28a assign default debug level to the MSHDEBUG define 2006-06-20 20:37:01 +00:00
Rob Landley
a34b48abe5 Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH. 2006-06-14 01:27:01 +00:00
Mike Frysinger
2a13175440 make the default prompt suck less when using fancy prompts 2006-06-06 06:26:12 +00:00
Bernhard Reutner-Fischer
e15d7573a1 - move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
2006-06-02 20:56:16 +00:00
Mike Frysinger
3132e9d830 use xmalloc() 2006-06-02 06:30:30 +00:00
Bernhard Reutner-Fischer
b180e5a766 - use portability wrapper define bb_setpgrp. 2006-05-26 14:24:56 +00:00
Mike Frysinger
1781188a9d didnt mean to commit debug enable 2006-05-05 20:33:07 +00:00
Mike Frysinger
02d8fa48ad use %p when printing pointers, not %x 2006-05-05 20:32:31 +00:00
Mike Frysinger
4e512f1062 fix Bug 659 as reported by Robin Getz 2006-05-05 18:38:07 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
"Vladimir N. Oleynik"
dd1ccddf1b moved BB_BANNER to applets/version.c file: make kernel like version,
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-02-16 15:40:24 +00:00
Eric Andersen
a68ea1cb93 fix up yet more annoying signed/unsigned and mixed type errors 2006-01-30 22:48:39 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
"Vladimir N. Oleynik"
485d7cbdf1 data --> text 2005-10-17 09:48:57 +00:00
"Vladimir N. Oleynik"
6c35c7c976 usage bb_dev_null 2005-10-12 15:34:25 +00:00
"Vladimir N. Oleynik"
ac9731704a Reduce exported from msh applet 2005-09-22 14:38:17 +00:00
Paul Fox
54690dc0b2 applyinf fix for:
0000155: variable expansion with braces in backticks in msh
2005-07-20 18:33:12 +00:00
Eric Andersen
fd7a4c8c28 Jonas Holmberg from axis dot com writes:
This patch makes msh handle variable expansion within backticks more
correctly.

Current behaviour (wrong):
--------------------------

BusyBox v1.00-rc3 (2004.08.26-11:51+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

$ A='`echo hello`'
$ echo $A
`echo hello`
$ echo `echo $A`
hello
$


New behaviour (correct):
------------------------

BusyBox v1.00-rc3 (2004.08.26-11:51+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

$ A='`echo hello`'
$ echo $A
`echo hello`
$ echo `echo $A`
`echo hello`
$

The current behaviour (wrong according to standards) was actually my
fault. msh handles backticks by executing a subshell (which makes it
work on MMU-less systems). Executing a subshell makes it hard to only
expand variables once in the parent. Therefore I export all variables
that will be expanded within the backticks and let the subshell handle
the expansion instead.

The bug was found while searching for security leaks in CGI-scripts.
Current behaviour of msh makes it easy to expand backticks by mistake
in $QUERY_STRING. I recommend appling the patch before release of bb
1.00.

/Jonas
2004-09-02 23:13:10 +00:00
Eric Andersen
785001468d Quiet a few warnings 2004-08-27 19:55:28 +00:00
Eric Andersen
12de6cf0d7 Michael Leibow, MichaelLe at belkin.com writes:
A question was posted a month ago by Mark Alamo to see if others had
problems with sourcing subscripts within msh.  We asked his firm to fix the
msh.c bug he described because we didn't have enough time to do it
ourselves.

When msh.c is executing a compound statement and there is a . command to
source another script file, msh.c will not execute the subscript until it's
completed executing the rest of the compound statement.

His example was this:

Echo "Start" ; . ./subA; echo "mid" ; . ./subB ; echo "end"

subA and subB execute AFTER end is printed in reverse order.  The same is
true if the sourced files are inside an if else fi, case esac, or any
compound statement.

Attached is a patch to msh.c.  It fixes the problem.  Cd to the root of your
busybox tree and execute "patch -p1 < msh.c.patch"

Unfortunately, I won't have more time to work on this so I hope that there
aren't any problems!

Michael Leibow
Senior Software Engineer

Belkin Corporation
2004-08-04 19:19:10 +00:00
Eric Andersen
8401eeafd6 Run msh through indent 2004-08-04 19:16:54 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
075dd81c44 Remove the CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN option. It was sortof
stupid and didn't work properly anyways.
2004-04-07 09:34:27 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Glenn L McGrath
dc4e75ef7c move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107
2003-09-02 02:36:18 +00:00
Eric Andersen
cb81e6484d Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
737f5fb890 Patch from Jonas Holmberg, adjusted by Robert Schwebel, and
later re-adjusted by me to fix msh backtick handling
2003-03-14 16:05:59 +00:00
Eric Andersen
392947c860 Fixup all the horrible broken function prototypes
-Erik
2002-12-11 07:42:46 +00:00
Eric Andersen
1c31501b1b Ensure that getenv("PATH") stays current, since otherwise cmdedit
(which calls getenv("PATH")) would not operate upon the current
PATH settings, which was really quite iritating.
 -Erik
2002-04-26 23:40:09 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
d63dee4019 Add an option to make the shells not advertise their busybox nature 2001-10-19 00:22:23 +00:00
Matt Kraai
69edfecfb9 Add support for underscores in variable names. 2001-08-06 14:14:18 +00:00
Matt Kraai
2d91deba45 Allow multiple shells to be enabled. 2001-08-01 17:21:35 +00:00
Eric Andersen
7467c8d3b6 Patch from vodz:
Changed email address
    cmdedit API change
    optimizations for traceroute and md5sum
    added a new shared create_icmp_socket() function
2001-07-12 20:26:32 +00:00
Matt Kraai
f69bfc76fa Allow assignments in the export and readonly commands. 2001-07-12 19:39:59 +00:00
Matt Kraai
ab6526c8b3 Remove debugging statement. 2001-07-12 18:44:34 +00:00
Eric Andersen
1c03923b0b Add in a shell tagline (per lash/hush behavior) to make it easier
to know which shell is in use.  Add in 'help' to list available
builtins, and fixup msh so it can do STANDALONE_SHELL.
 -Erik
2001-07-07 00:05:55 +00:00
Eric Andersen
ff9eee475f This is a busybox port of the Minix shell. It is reasonably capable,
handles all the basic stuff (for, case/esac, while, if/then/else), and
is very small (adds just 38k on x86).  It is not as rigorously correct
about Bourne semantics as bash, but for most things it is quite
workable.  There is still some work to be done to further shrink it (it
has its own globbing functions instead of using the libc ones, for
example), but it is quite usable as is.
 -Erik
2001-06-29 04:57:14 +00:00