aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * build system: always rewrite NUM_APPLETS.hDenys Vlasenko2016-08-231-10/+11
| | | | | | | | | | | | | | Conditional rewrite can keep NUM_APPLETS.h mtime old, this causes make to try to regenerate it at every invocation. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fdisk: tweak some messagesDenys Vlasenko2016-08-231-19/+24
| | | | | | | | | | | | | | | | | | | | "Total allocated sectors 2021315 greater than the maximum 2020356" maximum what? Turns out, that's the CHS size of the disk. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fdisk: print much less cryptic partition tableDenys Vlasenko2016-08-231-87/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: Device Boot Start End Blocks Id System /dev/sdb1 * 1 998 255471+ 6 FAT16 What are "blocks"? What is that "+"? How big is this partition? Is start/end shown came from LBA fields or CHS fields? Why are we torturing the user?? After: Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type /dev/sdb1 * 0,1,1 996,15,32 32 510974 510943 249M 6 FAT16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * man: fix parsing of "DEFINE pager xyz". Closes 8976Denys Vlasenko2016-08-221-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * init: fix for FreeBSD console opening. Closes 9031Denys Vlasenko2016-08-221-0/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unshare: --network should be --net. Closes 9116Denys Vlasenko2016-08-221-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * docs: Update filenames in keep_data_small.txtKang-Che Sung2016-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The filenames in docs/keep_data_small.txt are a little bit outdated. It's better to change it to the current name. decompress_unzip.c -> decompress_gunzip.c (since commit 774bce8e8ba1e424c953e8f13aee8f0778c8a911) libbb/messages.c -> libbb/ptr_to_globals.c (since commit 574f2f43948bb21d6e4187936ba5a5afccba25f6) Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix "redirects can close script fd" bugDenys Vlasenko2016-08-224-69/+186
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: different fix for include/applet_tables.h/include/NUM_APPLETS.hDenys Vlasenko2016-08-211-3/+16
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget/ssl_helper: update to wolfssl-3.9.8Denys Vlasenko2016-08-213-0/+52
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: do not leak script fds into NOEXEC childrenDenys Vlasenko2016-08-201-10/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We set all opened script fds to CLOEXEC, thus making then go away after fork+exec. Unfortunately, CLOFORK does not exist. NOEXEC children will still see those fds open. For one, "ls" applet is NOEXEC. Therefore running "ls -l /proc/self/fd" in a script from standalone shell shows this: lrwx------ 1 root root 64 Aug 20 15:17 0 -> /dev/pts/3 lrwx------ 1 root root 64 Aug 20 15:17 1 -> /dev/pts/3 lrwx------ 1 root root 64 Aug 20 15:17 2 -> /dev/pts/3 lr-x------ 1 root root 64 Aug 20 15:17 3 -> /path/to/top/level/script lr-x------ 1 root root 64 Aug 20 15:17 4 -> /path/to/sourced/SCRIPT1 ... with as many open fds as there are ". SCRIPTn" nest levels. Fix it by closing these fds after fork (only for NOEXEC children). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: bit better comments in redirect code. No logic changesDenys Vlasenko2016-08-201-11/+38
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: `cmd` and arithmetic also need the fix for FILE rewindDenys Vlasenko2016-08-191-32/+39
| | | | | | | | | | | | Discovered by running testsuite with a newest glibc Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix a bug in FEATURE_SH_STANDALONE=y config. Closes 9186Denys Vlasenko2016-08-193-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run this in a "sh SCRIPT": sha256sum /dev/null echo END sha256sum is a NOEXEC applet. It runs in a forked child. Then child exit()s. By this time, entire script is read, and buffered in a FILE object from fopen("SCRIPT"). But fgetc() did not consume entire input. exit() lseeks back by -9 bytes, from <eof> to 'e' in 'echo'. (this may be libc-specific). This change of fd position *is shared with the parent*! Now parent can read more, and it thinks there is another "echo END". End result: two "echo END"s are run. Fix this by _exit()ing instead. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: move free(prev_hist) out of signal pathDenys Vlasenko2016-08-191-6/+6
| | | | | | | | | | | | | | It was seen being called recursively on repeated signals, leading to double free Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifplugd: if SIOCSIFFLAGS fails with ENODEV, don't dieDenys Vlasenko2016-08-161-2/+6
| | | | | | | | | | | | | | | | Some user managed to hit a race where iface is gone between SIOCGIFFLAGS and SIOCSIFFLAGS (!). If SIOCSIFFLAGS fails, treat it the same as failed SIOCGIFFLAGS Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: fix bracket search to match behavior of less 481Denys Vlasenko2016-08-161-9/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: fix SEGVDenys Vlasenko2016-08-161-2/+6
| | | | | | | | | | | | testcase: echo "" | less, then press ')' key Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: add test that checks that -9 compresses better than -1Natanael Copa2016-08-151-0/+5
| | | | | | | | | | Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: fix compression level bug. Closes 9131Natanael Copa2016-08-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix broken logic to get the gzip_level_config value from options -1 to -9. This fixes an off-by-one bug that caused gzip -9 output bigger files than the other compression levels. It fixes so that compression level 1 to 3 are actually mapped to level 4 as comments say. It also fixes that levels -4 to -9 is mapped to correct level and avoids out-of-bounds access. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: trivial codeshrink for vi-modeNatanael Copa2016-08-141-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce and use BB_isalnum_or_underscore(). function old new delta BB_isalnum_or_underscore - 43 +43 vi_word_motion 162 150 -12 vi_end_motion 163 145 -18 vi_back_motion 198 179 -19 BB_isalnum 39 - -39 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/3 up/down: 43/-88) Total: -45 bytes Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: fix include/NUM_APPLETS.h generationDenys Vlasenko2016-08-141-5/+2
| | | | | | | | | | | | TBH, it's more like "work around my bad makefile-fu" than "fix"... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libiproute: eliminate some redundant zero storesDenys Vlasenko2016-08-142-27/+31
| | | | | | | | | | | | | | | | | | | | function old new delta do_iprule 974 955 -19 rtnl_dump_request 173 146 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-46) Total: -46 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip: fix an improper optimization: req.r.rtm_scope may be nonzero hereDenys Vlasenko2016-08-141-2/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: fix -i for POSIX mode. Closes 9106Denys Vlasenko2016-08-131-4/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: respond only to client and symmetric active packetsMiroslav Lichvar2016-08-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The busybox NTP implementation doesn't check the NTP mode of packets received on the server port and responds to any packet with the right size. This includes responses from another NTP server. An attacker can send a packet with a spoofed source address in order to create an infinite loop of responses between two busybox NTP servers. Adding more packets to the loop increases the traffic between the servers until one of them has a fully loaded CPU and/or network. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * service/fw example: do not ruin $if[], use different nameDenys Vlasenko2016-07-301-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: run s_client helper with -servername HOSTDenys Vlasenko2016-07-251-5/+44
| | | | | | | | | | | | | | | | | | | | | | This is necessary for multi-hosted TLSed web sites. function old new delta spawn_https_helper_openssl 334 441 +107 Based on a patch by Jeremy Chadwick <jdc@koitsu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ssl_helper.sh: strip was invoked incorrectlyDenys Vlasenko2016-07-251-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * var_service/fw: optionally flush all netdevs; optionally prefer one 0/0 routingDenys Vlasenko2016-07-251-12/+36
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix handling of ${VAR: -2}Denys Vlasenko2016-07-253-4/+25
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: disentangle PREFER_APPLETS from SH_STANDALONE and SH_NOFORKDenys Vlasenko2016-07-224-6/+11
| | | | | | | | | | | | | | | | On user request. I thought enabling/disabling them all together is more consistent. Evidently, some people do want them to be separately selectable. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix a possible bugDenys Vlasenko2016-07-211-1/+3
| | | | | | | | | | | | Not sure this was actually a triggerable bug, but the code looked flaky. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fixesDenys Vlasenko2016-07-192-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: do not leave SIGQUIT ignored on "exec CMD"Denys Vlasenko2016-07-163-1/+20
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: make verbose cp show symlink copies tooDenys Vlasenko2016-07-141-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sendmail: include -H and -S in short help textDenys Vlasenko2016-07-141-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sendmail: improve help textDenys Vlasenko2016-07-141-16/+14
| | | | | | | | | | | | | | | | * explain which server we contact by default * explain when auth is done * -t is not implied! remove that from help text Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * trylink: use "mktemp tmp.XXXXXXXXXX" to placate OS XDenys Vlasenko2016-07-121-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * {md5,shaN}sum: make -c EMPTY failDenys Vlasenko2016-07-112-14/+31
| | | | | | | | | | | | | | function old new delta md5_sha1_sum_main 466 485 +19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * examples: add a useful "see abridged log" script for ntpd service exampleDenys Vlasenko2016-07-101-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio: tweak help textDenys Vlasenko2016-07-081-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: don't attempt ANSI emulation on data containing NUL charactersRon Yorston2016-08-161-4/+11
| |
* | vi: remove duplicated codeRon Yorston2016-07-081-6/+1
| | | | | | | | | | | | At worst show_status_line() might be called needlessly when the user presses ^L/^R, but I don't think we'll get many complaints about that.
* | lineedit: tweak tab completion of commands in standalone shell modeRon Yorston2016-07-081-3/+11
| | | | | | | | | | | | | | | | | | | | When tab-completing commands in standalone shell mode: don't search the list of applet names if the command includes a path separator; since "busybox" doesn't appear in the list of applet names check for it separately.
* | mingw: enable whois in default configurationRon Yorston2016-07-082-2/+2
| |
* | win32: allow for vsnprintf returning -1Ron Yorston2016-07-081-1/+6
| | | | | | | | | | | | | | vsnprintf can return -1. I've seen it do this when writing to a small buffer while vsnprintf(NULL, 0, ...) returns a valid length. I'd prefer not to rely on the latter working with arbitrary old Windows runtimes so just skip ANSI emulation if -1 is returned.
* | Merge branch 'busybox' into mergeRon Yorston2016-07-0794-459/+692
|\|
| * getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-0658-159/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whois: implement -iDenys Vlasenko2016-07-061-7/+11
| | | | | | | | | | | | | | | | function old new delta whois_main 654 675 +21 packed_usage 30355 30356 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>