aboutsummaryrefslogtreecommitdiff
path: root/shell (follow)
Commit message (Collapse)AuthorAgeFilesLines
* change interface to bb_xasprintf() - more perfect for me.vodz2005-09-291-1/+1
| | | | | | | ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers reduce 100 bytes don't care in sum git-svn-id: svn://busybox.net/trunk/busybox@11694 69ca8d6d-28ef-0310-b511-8ec308f3f277
* correct set prompt if CONFIG_ASH_EXPAND_PRMT enabled, small automatic ↵vodz2005-09-261-3/+12
| | | | | | space->tabs convert by my personal editor git-svn-id: svn://busybox.net/trunk/busybox@11650 69ca8d6d-28ef-0310-b511-8ec308f3f277
* use the shorter license headervapier2005-09-241-15/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11624 69ca8d6d-28ef-0310-b511-8ec308f3f277
* use brief license linevapier2005-09-241-15/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11618 69ca8d6d-28ef-0310-b511-8ec308f3f277
* rename menu and touchup whitespacevapier2005-09-241-9/+9
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11615 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Reduce exported from msh appletvodz2005-09-221-5/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11580 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Reduce exported from lash appletvodz2005-09-221-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11579 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Reduce exported from hush appletvodz2005-09-221-13/+15
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11578 69ca8d6d-28ef-0310-b511-8ec308f3f277
* more remove lost exportedvodz2005-09-221-6/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11574 69ca8d6d-28ef-0310-b511-8ec308f3f277
* committing:pgf2005-09-072-58/+108
| | | | | | | | | | | Summary 0000242: ash: read -t broken this also implements -n and -s options to read. (they're configured together because most of their code is in common, and separating them seemed silly. git-svn-id: svn://busybox.net/trunk/busybox@11351 69ca8d6d-28ef-0310-b511-8ec308f3f277
* destroy bug [0000404]vodz2005-09-051-5/+5
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11334 69ca8d6d-28ef-0310-b511-8ec308f3f277
* 1) sync with dash_0.5.2-7vodz2005-09-052-59/+103
| | | | | | | | 2) but expand PS# as config option 3) correct kill error message again 4) remove show "line number" for interactive run (patch pending for dash) git-svn-id: svn://busybox.net/trunk/busybox@11331 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Stephane Billiart to improve ash error message.landley2005-08-141-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11148 69ca8d6d-28ef-0310-b511-8ec308f3f277
* implemented a builtin echo command in ash. moved the guts of thepgf2005-08-092-33/+34
| | | | | | | | | echo applet into libbb, and now call bb_echo() from both echo.c and ash.c git-svn-id: svn://busybox.net/trunk/busybox@11083 69ca8d6d-28ef-0310-b511-8ec308f3f277
* commiting:pgf2005-08-044-34/+388
| | | | | | | 0000025: vi-editing mode for ash git-svn-id: svn://busybox.net/trunk/busybox@11044 69ca8d6d-28ef-0310-b511-8ec308f3f277
* use toplevel ARFLAGS and update default ARFLAGS to be quietvapier2005-07-271-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10923 69ca8d6d-28ef-0310-b511-8ec308f3f277
* revert 10881, and refix by changing "if (vallen)" to "if (val)". thispgf2005-07-211-2/+3
| | | | | | | | is per the upstream fix for dash, in dash_0.5.2-6.diff. thanks vodz, for catching this. git-svn-id: svn://busybox.net/trunk/busybox@10888 69ca8d6d-28ef-0310-b511-8ec308f3f277
* applying fix for:pgf2005-07-201-2/+1
| | | | | | | | 0000261: Unsafe empty env var export in ash git-svn-id: svn://busybox.net/trunk/busybox@10881 69ca8d6d-28ef-0310-b511-8ec308f3f277
* applyinf fix for:pgf2005-07-201-1/+1
| | | | | | | | 0000155: variable expansion with braces in backticks in msh git-svn-id: svn://busybox.net/trunk/busybox@10876 69ca8d6d-28ef-0310-b511-8ec308f3f277
* applying fix from:pgf2005-07-201-11/+22
| | | | | | | 0000152: ash: quoting rules for local variables different to globals git-svn-id: svn://busybox.net/trunk/busybox@10875 69ca8d6d-28ef-0310-b511-8ec308f3f277
* applying:pgf2005-07-191-2/+2
| | | | | | | | | | | 0000054: Tab completing filenames in ash causes SEGV Simple tab completion operations cause busybox (ash) to access illegal addresses. git-svn-id: svn://busybox.net/trunk/busybox@10861 69ca8d6d-28ef-0310-b511-8ec308f3f277
* This one's from me. Fix ash "standalone shell".landley2005-05-071-21/+7
| | | | | | | | | | | | If we exec /proc/self/exe and only fall back to /bin/busybox if /proc isn't there, then we have a reasonable chance of having the standalone shell work even if busybox isn't installed in /bin on the system in question. Still won't work in a chroot environment, but it's an improvement. git-svn-id: svn://busybox.net/trunk/busybox@10264 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Shaun Jackman writes: Newlib uses both __getopt_initialized and optind to ↵vapier2005-03-041-5/+11
| | | | | | track initialization of getopt() git-svn-id: svn://busybox.net/trunk/busybox@9972 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - no need to check if JOBS is defined. Config.in ensures it.solar2005-02-101-7/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9838 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - add ash read -t timeout support. initial code provided by Tim Yamin on ↵solar2005-02-092-3/+74
| | | | | | Oct/21/2004 on the busybox mailing list. Edited his code a little to keep syntax highlighers happy and make it optional when CONFIG_ASH_TIMEOUT is defined git-svn-id: svn://busybox.net/trunk/busybox@9837 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix CONFIG_ASH_MATH_SUPPORT_64 so it actually worksandersen2004-10-081-4/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9331 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Hiroshi Ito writes:andersen2004-10-081-0/+1
| | | | | | | | | | | ash "unset OLDPWD; cd -" causes segmentation fault. ( OLDPWD is not set when sh is invoked from getty. ) patch against current CVS is attached. git-svn-id: svn://busybox.net/trunk/busybox@9325 69ca8d6d-28ef-0310-b511-8ec308f3f277
* egor duda writes:andersen2004-10-082-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hi! I've created a patch to busybox' build system to allow building it in separate tree in a manner similar to kbuild from kernel version 2.6. That is, one runs command like 'make O=/build/some/where/for/specific/target/and/options' and everything is built in this exact directory, provided that it exists. I understand that applyingc such invasive changes during 'release candidates' stage of development is at best unwise. So, i'm currently asking for comments about this patch, starting from whether such thing is needed at all to whether it coded properly. 'make check' should work now, and one make creates Makefile in build directory, so one can run 'make' in build directory after that. One possible caveat is that if we build in some directory other than source one, the source directory should be 'distclean'ed first. egor git-svn-id: svn://busybox.net/trunk/busybox@9320 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a typobug12004-09-241-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9275 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A bit of extra explanation regarding STANDALONEandersen2004-09-241-0/+5
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9272 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patrick Huesmann noticed BusyBox would not link whenandersen2004-09-081-0/+2
| | | | | | | | | | | | | | | | | CONFIG_FEATURE_COMMAND_EDITING was defined *and* CONFIG_FEATURE_COMMAND_TAB_COMPLETION was undefined. Vladimir N. Oleynik writes: Its declare always, also if CONFIG_FEATURE_COMMAND_TAB_COMPLETION undefined. Patch to CVS version attached. --w vodz git-svn-id: svn://busybox.net/trunk/busybox@9226 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Jonas Holmberg from axis dot com writes:andersen2004-09-021-22/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@9199 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Quiet a few warningsandersen2004-08-271-19/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9179 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Vladimir N. Oleynik:andersen2004-08-192-1/+2
| | | | | | | | | | | | | | | | | | | On Wed Aug 18, 2004 at 06:52:57PM +0800, Matt Johnston wrote: > I've come across some strange-seeming behaviour when running programs > under Busybox (1.0.0-rc3) ash. If the child process sets stdin to be > non-blocking and then exits, the parent ash will also exit. A quick strace > shows that a subsequent read() from stdin returns EAGAIN (as would be > expected): Thanks! Patch attached. --w vodz git-svn-id: svn://busybox.net/trunk/busybox@9127 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Joe.C writes:andersen2004-08-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug is in busybox 1.0.0-rc2. When using lash exec builtin with redirection, the opened file fd keep increasing. For example, please try the following command with lash. ls -al /proc/<lash pid>/fd exec /bin/sh 2>/dev/null ls -al /proc/<lash pid>/fd The last 'ls' command output will look like this. The fd number 4 shouldn't exist. lrwx------ 1 501 100 64 Aug 13 13:56 4 -> /dev/pts/5 l-wx------ 1 501 100 64 Aug 13 13:56 2 -> /dev/null lrwx------ 1 501 100 64 Aug 13 13:56 1 -> /dev/pts/5 lrwx------ 1 501 100 64 Aug 13 13:56 0 -> /dev/pts/5 dr-xr-xr-x 3 501 100 0 Aug 13 13:56 .. dr-x------ 2 501 100 0 Aug 13 13:56 . This one-line patch fix this problem by setting CLOEXEC flag for squirrel fd. Please apply. Joe.C git-svn-id: svn://busybox.net/trunk/busybox@9100 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Tito to fix warnings about redifined functionions barrier and likely.bug12004-08-061-9/+9
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9064 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Michael Leibow, MichaelLe at belkin.com writes:andersen2004-08-041-375/+1056
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@9062 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Run msh through indentandersen2004-08-041-1313/+1164
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9061 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Paul Whittaker writes:andersen2004-07-241-0/+1
| | | | | | | | | | | | | | | | With job control enabled, ash fails to tcsetpgrp back to initialpgrp upon exit. exitshell() should call setjobctl(0) to do this. Context: I am using a lightweight menu system (replimenu[.sf.net]) on my console, which invokes "/bin/sh -i -c /bin/login", where /bin/sh and /bin/login are busybox applets. /bin/sh is ash, with CONFIG_ASH_JOB_CONTROL=y as the sole suboption. The shell of the user concerned (nobody) is also /bin/sh (ash). When the user /bin/sh exits (and thereby login and its parent sh), replimenu receives EIO when it tries to read from the terminal. git-svn-id: svn://busybox.net/trunk/busybox@9013 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Jean Wolter, fixes compiler warning when ASH_ALIAS isbug12004-07-211-27/+27
| | | | | | | disabled. git-svn-id: svn://busybox.net/trunk/busybox@8991 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix compile error when math support disabled.bug12004-06-251-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8925 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Stupidity-1, Erik-0andersen2004-06-221-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8920 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Bastian Blank notices a couple of int64_ts that should haveandersen2004-06-221-2/+1
| | | | | | | been longs git-svn-id: svn://busybox.net/trunk/busybox@8919 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Bastian Blank:andersen2004-06-222-12/+31
| | | | | | | | | | | | | | | The updated patch adds a config option to explicitely enable 64 bit arithmetic. Also it removes the arith prototype from libbb.h as it is not used outside of ash. Bastian this patch has been slightly modified by Erik for cleanliness. git-svn-id: svn://busybox.net/trunk/busybox@8910 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Larry Doolittle writes:andersen2004-04-144-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@8759 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Wolfgang Denk writes:andersen2004-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | He, there is a bug in HUSH's handling of "if" / "elif" commands: $ if true > then > echo 1 > elif > true > then > echo 2 > elif > true > then > echo 3 > else > echo 4 > fi 1 2 3 $ The same bug exists in all versions of HUSH from BB v0.60.x up to and including v1.00-pre9. The attached patch fixes this: $ if true > then > echo 1 > elif > true > then > echo 2 > elif > true > then > echo 3 > else > echo 4 > fi 1 $ Best regards, Wolfgang Denk git-svn-id: svn://busybox.net/trunk/busybox@8747 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Peter Milne writes:andersen2004-04-121-3/+22
| | | | | | | | | | | | | | | | | | | Just upgraded from 0.6 to 1.00-pre8 Dot command handling handled args correctly (same as bash) in 0.60, but failed in 1.00: I fixed this by reverting the dotcmd function back to previous 0.60 instantiation, please consider using the older version. Thanks Peter git-svn-id: svn://busybox.net/trunk/busybox@8739 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Jamie Guinan writes:andersen2004-04-122-3/+3
| | | | | | | | | | | | | | It looks like latest uClibc defines ARCH_HAS_MMU, but a few busybox files test UCLIBC_HAS_MMU, resulting in vfork() getting called instead of fork(), etc. Patch below. Only tested for lash. Cheers, -Jamie git-svn-id: svn://busybox.net/trunk/busybox@8738 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix spelling. "sort of" is two words.andersen2004-04-121-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8734 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove the CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN option. It was sortofandersen2004-04-075-40/+8
| | | | | | | stupid and didn't work properly anyways. git-svn-id: svn://busybox.net/trunk/busybox@8714 69ca8d6d-28ef-0310-b511-8ec308f3f277