aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-06-30cryptpw: do not segfault on EOF. Closes 6350Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30*: change execl sentinels from NULL to (char*)0Rich Felker
Signed-off-by: Rich Felker <dalias@aerifal.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30ubi_tools: enhance -s option to allow size multiplier to match mtd-utilsDenys Vlasenko
Based on patch by Paul B. Henson <henson@acm.org> function old new delta static.size_suffixes - 32 +32 ubi_tools_main 1141 1148 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30ubi_tools: add forgotten argv++Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30ubi_tools: extend supported volume size to 64 bits; shrink codeDenys Vlasenko
function old new delta get_num_from_file - 90 +90 packed_usage 29395 29377 -18 ubi_tools_main 1349 1141 -208 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 90/-226) Total: -136 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30ubimkvol: add -m option to create volume of maximum sizePaul B. Henson
Signed-off-by: Paul B. Henson <henson@acm.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28pstree: fix theoretically unsafe codeDenys Vlasenko
In practice, p->comm is never long enough to trigger the bug, but still. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28ping: code shrinkDenys Vlasenko
function old new delta unpack_tail 262 243 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28Move create_icmp[6]_socket to its only user, and simplify itDenys Vlasenko
function old new delta run_applet_and_exit 711 714 +3 sendping_tail 239 236 -3 common_ping_main 1798 1770 -28 create_icmp_socket 65 - -65 create_icmp6_socket 65 - -65 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 1/2 up/down: 3/-161) Total: -158 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-27losetup: assorted fixes. Closes 6314Denys Vlasenko
"losetup -d" was not complaining that LOOPDEV is missing. "losetup -a" was listing only up to /dev/loop9. "losetup -f" looped forever if llop0 was taken, and never tried anything after /dev/loop9. "-o" with other options (say, -r) had no effect. function old new delta losetup_main 376 419 +43 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-27lsof: correct check for symbolic linkThomas De Schampheleire
Busybox lsof used the d_type field of a 'struct dirent' to verify whether the entry is a symbolic link. This field, however, is not portable. On at least one board [1] I have seen, that field is 0, and the check fails even though the entry is a link. The explicit check for a symbolic link is really only needed to skip the default directory entries '.' and '..'. The directory /proc/<pid>/fd/ should not contain anything else but these two and symbolic links. With these assumptions, this patch replaces the explicit link check with a basic check for '.' and '..' (and any hidden file). In the unlikely case that there are other file types, xmalloc_readlink() will return NULL, and we can skip the entry. [1] A MIPS-based board with glibc 2.9, Linux 2.6.32.27. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-27nslookup: set default DNS server again. Hopefully helps with 675Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-27md5/sha512: a better fix for strict aliasing warningsDenys Vlasenko
The locations *are* well-aligned for direct stores on any architecture. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-19md5/sha512: fix strict aliasing warningsMike Frysinger
If the target can tolerate these issues, then gcc is smart enough to generate the same code (x86_64 produces the same code). If the target can't, then it needs the memcpy anyways. libbb/hash_md5_sha.c: In function 'common64_end': libbb/hash_md5_sha.c:87:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[64 - 8]) = t; libbb/hash_md5_sha.c: In function 'sha512_end': libbb/hash_md5_sha.c:886:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[128 - 8]) = t; libbb/hash_md5_sha.c:889:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[128 - 16]) = t; Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-06-19pstree: stop truncating thread namesMike Frysinger
This also fixes a minor buffer overflow when displaying threads as add_proc() only expects COMM_LEN bytes, but we give it one more than that. Reported-by: Dag Wieers <dag@wieers.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-23ntpd: set offset to 0.0 in "usync" eventDenys Vlasenko
function old new delta ntpd_main 1030 1026 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22ntpd: set G.last_script_run even if script isn't configuredDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22ntpd: make "unsync" code actually work.Denys Vlasenko
While at it: don't run "periodic" if interrupted by a signal. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22ntpd: drop delay outliers; run "unsync" handler if no replies for some timeDenys Vlasenko
function old new delta ntpd_main 960 1029 +69 recv_and_process_peer_pkt 834 892 +58 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 127/0) Total: 127 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-21sulogin: allow system maintenance login if root password is emptyJonathan Liu
The current password checking is unable to distinguish between the user entering an empty password or pressing Control-D. As a result, an empty password always results in normal startup. We modify bb_ask to return NULL if Control-D is pressed without entering a password. The sulogin applet is then modified to only proceed to normal startup if bb_ask returns NULL. This covers EOF with no password, interrupt by timeout and ^C. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-21sulogin: correct lying commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-21init: remove special-case code for machines with less tham 1 MB of RAM.Denys Vlasenko
function old new delta init_main 920 781 -139 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-17stty: disable CIBAUD leak check - it is not necessary on LinuxDenys Vlasenko
function old new delta stty_main 1233 1196 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-17stty: code shrinkDenys Vlasenko
function old new delta set_mode 759 725 -34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-17udhcp: code shrinkDenys Vlasenko
function old new delta attach_option 416 413 -3 allocate_tempopt_if_needed 74 - -74 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-17udhcpc: fix a problem with binary-encoded options #2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-16find:: get rid of nested function (it's a gcc-ism)Denys Vlasenko
function old new delta alloc_action - 80 +80 parse_params 1459 1445 -14 static.alloc_action 98 - -98 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 80/-112) Total: -32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-16grep: fix grep -x to not set REG_NOSUBJames Hogan
When -F isn't specified (and !ENABLE_EXTRA_COMPAT), grep -x uses regexec's regmatch_t output to determine if the match was the entire line. However it also set the REG_NOSUB flag which makes it ignore the regmatch_t argument. Add an exception to the setting of REG_NOSUB for OPT_x and add some test cases to test the behaviour of -x. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Natanael Copa <ncopa@alpinelinux.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-15volume_id_internal.h: drop unoptimized byteswap routinesDenys Vlasenko
function old new delta volume_id_probe_hfs_hfsplus 802 627 -175 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-15grep: don't bail out on first mismatch if '-w' option is setBartosz Golaszewski
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-15Fix build failures caused by not compiling open_transformer.c (#2)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-14find: support -HLPDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-13mdev: use $DEVNAME in uevent sysfs file for device node nameNikolaus Voss
516530c932bd17d87c9eb4347a490be051e495f4 uses $DEVNAME variable for device node name. This is fine, but only works for hotplugging, "mdev -s" will behave differently when DEVNAME and basename(path) differ. This patch extracts the DEVNAME from the uevent sysfs file in make_device(), thus works for hot- and coldplugging; so using the environment DEVNAME on hotplug events is no longer necessary. Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12hush: fix build failure if FEATURE_EDITING=y && !HUSH_INTERACTIVEDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12Fix build failures caused by not compiling open_transformer.cDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12telnet: code shrinkDenys Vlasenko
function old new delta telnet_main 1519 1515 -4 con_escape 296 285 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-09volume_id: fix ntfs attribute searchOliver Metz
len is declared as uint32_t but le16_to_cpu macro is used Signed-off-by: Oliver Metz <oliver.metz@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-21vi: make regexp search case-insensitive if ":set ignorecase" is activeDenys Vlasenko
Reported by Dan Moinescu <dan@moinescu.net>. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-07ash,hush: history builtinFlemming Madsen
function old new delta show_history - 39 +39 builtin_history - 16 +16 historycmd - 13 +13 bltins1 312 324 +12 builtintab 336 344 +8 popstring 134 140 +6 hush_main 1048 1046 -2 ash_main 1398 1396 -2 size_from_HISTFILESIZE 44 40 -4 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 3/3 up/down: 94/-8) Total: 86 bytes Signed-off-by: Flemming Madsen <busybox@themadsens.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-07hush: fix for "while false && true; do echo BUG; break; done". closes 6170Denys Vlasenko
function old new delta run_list 959 941 -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-02mdev: call index_in_strings on $ACTION only after we checked it for NULLDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-02examples/mdev.conf.change_blockdev.sh: updateDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-30examples: add mdev example for Android phoneDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29examples/inittab: fix a few incorrect statements about initDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29lineedit: \W on "/bin" should show "bin", not "/bin"Denys Vlasenko
function old new delta parse_and_put_prompt 793 785 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29lineedit: implement \T \t \A \@ prompts escapes, fix \W escape, drop \!Denys Vlasenko
function old new delta parse_and_put_prompt 742 793 +51 read_line_input 3836 3826 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()Denys Vlasenko
function old new delta strftime_fmt - 53 +53 strftime_YYYYMMDDHHMMSS - 12 +12 strftime_HHMMSS - 12 +12 human_time 44 43 -1 fmtstr_t 9 - -9 step_time 361 345 -16 watch_main 261 232 -29 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes text data bss dec hex filename 919203 932 17692 937827 e4f63 busybox_old 919209 932 17692 937833 e4f69 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-28lineedit: add handling of \H in promptDenys Vlasenko
Based on the patch by Arnaud RĂ©billout <rebillout@syscom.ch> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-27hexdump: need to use xstrtoull for off_tDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-27hexdump: don't unconditionally limit the usable address rangeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>