aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2004-03-31Junio Hamano, junio at twinsun dot com writes:Eric Andersen
The sed command in busybox 1.0.0-pre8 loses leading whitespace in 'a' command ('i' and 'c' commands are also affected). A patch to fix this is attached at the end of this message. The following is a transcript that reproduces the problem. The first run uses busybox 1.0.0-pre3 as "/bin/sed" command, which gets the expected result. Later in the test, /bin/sed symlink is changed to point at busybox 1.0.0-pre8 and the test script is run again, which shows the failure. === reproduction recipe === * Part 1. Use busybox 1.0.0-pre3 as sed; this works. root# cd /tmp root# cat 1.sh #!/bin/sh cd /tmp rm -f ipsec.conf ipsec.conf+ cat >ipsec.conf <<\EOF version 2.0 config setup klipsdebug=none plutodebug=none plutostderrlog=/dev/null conn %default keyingtries=1 ... EOF sed -e '/^config setup/a\ nat_traversal=yes' ipsec.conf >ipsec.conf+ mv -f ipsec.conf+ ipsec.conf root# sh -x 1.sh + cd /tmp + rm -f ipsec.conf ipsec.conf+ + cat + sed -e /^config setup/a\ nat_traversal=yes ipsec.conf + mv -f ipsec.conf+ ipsec.conf root# cat ipsec.conf version 2.0 config setup nat_traversal=yes klipsdebug=none plutodebug=none plutostderrlog=/dev/null conn %default keyingtries=1 ... root# sed --version sed: invalid option -- - BusyBox v1.00-pre3 (2004.02.26-18:47+0000) multi-call binary Usage: sed [-nef] pattern [files...] * Part 2. Continuing from the above, use busybox 1.0.0-pre8 as sed; this fails. root# ln -s busybox-pre8 /bin/sed-8 root# mv /bin/sed-8 /bin/sed root# sed --version This is not GNU sed version 4.0 root# sed -- BusyBox v1.00-pre8 (2004.03.30-02:44+0000) multi-call binary Usage: sed [-nef] pattern [files...] root# sh -x 1.sh + cd /tmp + rm -f ipsec.conf ipsec.conf+ + cat + sed -e /^config setup/a\ nat_traversal=yes ipsec.conf + mv -f ipsec.conf+ ipsec.conf root# cat ipsec.conf version 2.0 config setup nat_traversal=yes klipsdebug=none plutodebug=none plutostderrlog=/dev/null conn %default keyingtries=1 ... root# === reproduction recipe ends here === This problem was introduced in 1.0.0-pre4. The problem is that the command argument parsing code strips leading whitespaces too aggressively. When running the above example, the piece of code in question gets "\n\tnat_traversal=yes" as its argument in cmdstr variable (shown part in the following patch). What it needs to do at this point is to strip the first newline and nothing else, but it instead strips all the leading whitespaces at the beginning of the string, thus losing the tab character. The following patch fixes this.
2004-03-31Patch from Thomas Winkler:Eric Andersen
ifconfig did not look up hostnames, so ifconfig lo localhost would not work, you have to do ifconfig lo 127.0.0.1
2004-03-31Patch from Thomas Winkler showing the the system time for each processEric Andersen
when running 'top'
2004-03-31Patch from Thomas Winkler -- vi -R did not workEric Andersen
2004-03-30Sigh. what a mess.Eric Andersen
2004-03-30As waldi noticed, checks for the size of an off_t and castingEric Andersen
etc was also redundant and possibly buggy...
2004-03-30Go ahead and kill off the FDISK_SUPPORT_LARGE_DISKS option,Eric Andersen
as it is redundant....
2004-03-30The fdisk llseek junk was redundant, since both uClibc and glibcEric Andersen
automatically promote lseek and friends to their 64 bit counterparts when CONFIG_LFS is enabled, since it enables __USE_FILE_OFFSET64
2004-03-29As noted by Martin Schwenke, the example for find was wrongEric Andersen
2004-03-27Yet more doc cleanupsEric Andersen
2004-03-27Add missing include filesEric Andersen
2004-03-27passwd and sulogin also need libcrypt, via libbb/pw_encrypt()Eric Andersen
2004-03-27s/fileno\(stdin\)/STDIN_FILENO/gEric Andersen
s/fileno\(stdout\)/STDOUT_FILENO/g
2004-03-27Vladimir N. Oleynik (vodz) writes:Eric Andersen
Ok. Last patch reduce 73 bytes for compensate (and over) your changes ;-) Comments: Added cin_fileno variable, auto setted to 0 from BSS and have "eq" stdin descriptor if isatty(stout)==0, removed global variable FILE* cin. Removed default setting to terminal_width/terminal_height, this used only from main() and setted after call get_terminal_width_height() always correct. Variable please_display_more_prompt changed to bits logic, have size reducing. --w vodz
2004-03-27Update docsEric Andersen
2004-03-23Brian Pomerantz writes:Eric Andersen
I've noticed a bug in the "autowidth" feature more, and is probably in others. The call to the function get_terminal_width_height() passes in a file descriptor but that file descriptor is never used, instead the ioctl() is called with 0. In more_main() the call to get_terminal_width_height() passes 0 as the file descriptor instead of fileno(cin). This isn't a problem when you more a file (e.g. "more /etc/passwd") but when you pipe a file to it (e.g. "cat /etc/passwd | more") the size of the terminal cannot be determined because file descriptor 0 is not a terminal. The fix is simple, I've attached a patch for more.c and get_terminal_width_height.c. BAPper
2004-03-22Some corrections from vodz:Robert Griebl
- Make -u/-l mutually exclusive - Minor size reduction
2004-03-21The utc variable was not modified according to the -u/-l command lineRobert Griebl
parameters.
2004-03-20Tito noticed a printf that should have been a bb_error_msg.Eric Andersen
2004-03-19Oops.. got a bit to aggressive with size optimization and global replace. :-(Manuel Novoa III
2004-03-19As noted in a patch from Kendrick Hamilton, rmmod was onlyEric Andersen
half way converted, and still used the old delete_module(), call rather than a syscall, in one spot.
2004-03-19Add missing ELFCLASSM for m68kEric Andersen
2004-03-19Only use R_68K_GOTOFF if it is definedEric Andersen
2004-03-19Fix broken arg parsing (was not passing pointer to items so p, argc, and argvEric Andersen
were only modified locally). Fix error reporting to properly describe why ioctls fail.
2004-03-16Patch from vodz to fix the dynamic vars patch, which I should notEric Andersen
have checked in. Vladimir writes: Your patch have many problem. 1. You always added + time(). This cannot reset RANDOM=value for debuging with replay sequential. 2. Hmm. I examine bash 2.04 source. This pseudorandom generator use low bits of counter value. You use high bits. This make bad pseudorandom values after have 0-value. For example, if + time() do remove, your generator always return 0 after first generate 0. 3. Memory leak per call. Use ash-unlike unecessary bb_strdup function. 4. Unsupport show last $RANDOM value for "set" and "export" command. 5. Bloat code. Busybox-unlike patch - added unstandart feature as default hardcode. Last patch attached. Erik, why you apply Paul patch with have 5-th point problem? :( Last patch have ash change xwrite() to fresh libbb/bb_full_write interfase (haved loop after EINTR). --w vodz
2004-03-15Oops. Using the wrong variable was a rather stupidEric Andersen
thing for me to do.
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2004-03-13I redid route.Manuel Novoa III
2004-03-13Update docs for start_stop_daemon to match reality. UpdateEric Andersen
the reality a bit to better match debian behavior.
2004-03-13Fix some doc generation problemsEric Andersen
2004-03-12Hideki IWAMOTO writes:Eric Andersen
Current `tr' implementation has a problem, if `plain char' is signed. [current cvs version] >echo a | _install/usr/bin/tr '\0' '\377' Segmentation fault (core dumped) [patched version] >echo a | _install/usr/bin/tr '\0' '\377' a
2004-03-12Fix some goofy formattingEric Andersen
2004-03-12Add prototypes for safe_strtol and friendsEric Andersen
2004-03-12Fix awk entry, which was not showing up in BusyBox.txt for some reasonEric Andersen
2004-03-11Paul Mundt, lethal at linux-sh dot org writes:Eric Andersen
Here's a follow-up replacement to the patch I sent earlier, this adjusts some of the semantics of the dynamic variable setting. Namely, dynamic vars can hook a set handler (which RANDOM uses to adjust the seed). They'll only lose their dynamic status if they're unset. I've used the same approach that bash does to come up with the random number, mostly just for consistency. For example: $ echo $RANDOM 13759 $ echo $RANDOM 20057 $ echo $RANDOM 1502 $ export RANDOM=42 $ echo $RANDOM 24179 $ echo $RANDOM 2046 $ unset RANDOM $ echo $RANDOM $ export RANDOM=42 $ echo $RANDOM 42 $
2004-03-10Patch from Thomas Frohlich to fix an option ordering bug of mine.Glenn L McGrath
2004-03-10When displaying the size in 1kB blocks round up if an odd number ofGlenn L McGrath
blocks
2004-03-10Patch by Seth W. Klein, the -l switch was reversedGlenn L McGrath
2004-03-10In spite of the feature freeze, check in a complete rework of route whichManuel Novoa III
fixes some bugs, adds some error checking, and removes _lots_ of bloat. Text size on i386... old new ipv6 5425 3523 no ipv6 3143 2193
2004-03-09Note that /proc must be mounted for filesystem type autodetectionEric Andersen
to work. Without /proc mounted, one must explicitly specify the type of every filesystem being mounted.
2004-03-09David Anders (prpplague) submitted this patch to allow login to workEric Andersen
when the device nodes are symlinks on a read only file system.
2004-03-08Fix broken sort order flags.Manuel Novoa III
2004-03-08My bug. :-(Manuel Novoa III
2004-03-06Fix/eliminate use of atolEric Andersen
2004-03-06Patch from Matt Kraai to fix debian bug number 231994.Glenn L McGrath
There was an extra blank line preceding the first directory.
2004-03-06Woops, how did that get in thereGlenn L McGrath
2004-03-06Don't build these support functions for uClibc, as it always suppliesManuel Novoa III
versions.
2004-03-05Patch from John Powers, adds multicast (rfc2090) and timeout (rfc2349)Glenn L McGrath
options
2004-03-05Patch from duane no-name, optionally request additional itemsGlenn L McGrath
2004-03-05Patch by Andrew Victor,Glenn L McGrath
In arpping.h, fix structure alignment of "struct arpMsg". GCC can insert padding in the structure which causes udhcpd to send an invalid ARP packet on the network. It will then not receive a valid reply, which can cause it to assign an IP address that's already in use on the network. (With kernels before 2.4.20, the "struct ethhdr" in linux/if_ether.h wasn't marked as packed. This is also an issue if your toolchain was built with a pre-2.4.20 kernel).