aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-02ps: avoid -o stat to contain spaces. Closes 9631Denys Vlasenko
function old new delta procps_scan 1227 1236 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-02-01cmdline module options can be disabled on "big" modutilsKang-Che Sung
Allow module options on command line to be disabled on "big" modutils. Config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is renamed to FEATURE_CMDLINE_MODULE_OPTIONS and no longer depends on !MODPROBE_SMALL (I'm not sure if disabling this is useful on "big" modutils, but at least the macro can serve as a marker and ensure both implementations of same feature have consistent behavior.) Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-02-01modutils: remove redundant "select PLATFORM_LINUX" configsKang-Che Sung
It is enough to have only applets' configs select PLATFORM_LINUX. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-02-01modprobe-small: move lsmod code out of modprobe_main()Kang-Che Sung
Having lsmod code inside modprobe_main() makes some of the applet name checking code awkward. Besides, this make busybox x86_64 binary a few bytes smaller. :) function old new delta lsmod_main - 23 +23 modprobe_main 599 564 -35 ------------------------------------------------------------------- (add/remove: 1/0 grow/shrink: 0/1 up/down: 23/-35) Total: -12 bytes Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-02-01modprobe-small: improve config help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-31ash: improve / fix glob expansionFelix Fietkau
When using musl libc glob() a very long string can cause glob() to fail, which leads to an out of memory error being raised by ash. This can happen easily if a very long quoted string contains *, even though no glob expansion should ever be performed on it (since it's quoted). Fix this by properly parsing control characters and escaping and only accept unquoted metacharacters. While we're at it, unify this check for libc and built-in glob expansion Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-30taskset: simplify code a bit; tweak --helpDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-30modprobe-small: fix --help texts, they are from "big" modutilsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-30modutils: fix config options dependencyKang-Che Sung
module.aliases and module.symbols files have no use in modprobe-small implementation. So FEATURE_MODUTILS_ALIAS and FEATURE_MODUTILS_SYMBOLS will depend on !MODPROBE_SMALL. The try_to_mmap_module() function is not called in modprobe-small.c, so I will let FEATURE_INSMOD_TRY_MMAP depend on !MODPROBE_SMALL for now. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Likewise, FEATURE_2_4_MODULES is not used by modprobe-small. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-30wget: add a big explanation what TLS code implements and what does notDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-30libbb: match_fstype() is unreadable in the extreme, fixing itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-29vi,fsck: do not use build timestamp unconditionally. Closes 9626Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-29taskset: separate "current" and "new" stringsDenys Vlasenko
Better for constant sharing: text data bss dec hex filename 912997 485 6856 920338 e0b12 busybox_old 912988 485 6856 920329 e0b09 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-29typo in commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-29taskset: rewrite to be task size-agnosticDenys Vlasenko
function old new delta packed_usage 31130 31190 +60 taskset_main 623 525 -98 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 60/-98) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-29*: add comment about APPLET_ODDNAME formatDenys Vlasenko
It confused me more than once Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26httpd: defend against attempts to OOM us. Closes 9611Denys Vlasenko
We were strdup'ing "Cookie: foo" every time we saw it. function old new delta handle_incoming_and_exit 2733 2821 +88 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26adduser: help for -G GRP is misleading, fix itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26sh: fix FEATURE_SH_STANDALONE help text: it does not enable NOFORKDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26libbb: spawn_and_wait() fflushes before forking NOEXEC; child reinits logmodeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26link: new appletDenys Vlasenko
coreutils grew itself a tiny simplistic alternative to ln: Usage: link FILE LINK Create hard LINK to FILE function old new delta link_main - 75 +75 packed_usage 31114 31131 +17 applet_names 2564 2569 +5 applet_main 1480 1484 +4 applet_install_loc 185 186 +1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/0 up/down: 102/0) Total: 102 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-25xxd: make -p output lines actually end with a newlineDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-25xxd: implement -pDenys Vlasenko
While at it, tweaked hexdump --help function old new delta xxd_main 364 414 +50 packed_usage 31097 31114 +17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-25libbb: shrink sump.cDenys Vlasenko
function old new delta dot_flags_width_chars - 16 +16 int_convs - 7 +7 lcc 7 - -7 index_str 16 - -16 rewrite 1013 937 -76 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 0/1 up/down: 23/-99) Total: -76 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-25ftpd/ls: show directories firstDenys Vlasenko
Old TODO finally done function old new delta ls_main 548 568 +20 packed_usage 31116 31097 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-25hexdump/xxd: a bit more condensed formatsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-25xxd: new appletDenys Vlasenko
Yet Another Hexdumper function old new delta xxd_main - 364 +364 packed_usage 31046 31116 +70 applet_names 2560 2564 +4 applet_main 1476 1480 +4 rewrite 1022 1013 -9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/1 up/down: 442/-9) Total: 433 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24ftpd: new option -a ANON_USER to allow anonymous loginsAndrey Mozzhuhin
Anonymous ftpd login is useful even when ftpd authentication feature is enabled. Anonymous logins provide simple password-less connection for FTP clients. To allow password-less connection user command line option '-a USER' is added. This option specifies the system user to use when 'anonymous' username is given in USER command. No password is required in this case. function old new delta ftpd_main 2164 2232 +68 packed_usage 31015 31046 +31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 99/0) Total: 99 bytes Signed-off-by: Andrey Mozzhuhin <amozzhuhin@yandex.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24wget: add support for -S --server-responseDenys Vlasenko
Based on the patch by stephane.billiart@gmail.com function old new delta ftpcmd 87 129 +42 fgets_and_trim 86 119 +33 static.wget_longopts 234 252 +18 packed_usage 31002 31015 +13 wget_main 2535 2540 +5 gethdr 158 163 +5 retrieve_file_data 424 428 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/0 up/down: 120/0) Total: 120 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24remove "local" bashism from a few scriptsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24tls: can download kernels now :)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24tls: if got CERTIFICATE_REQUEST, send an empty CERTIFICATEDenys Vlasenko
wolfssl test server is not satisfied by an empty one, but some real servers might be. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24tls: add 2nd cipher_id, TLS_RSA_WITH_AES_128_CBC_SHA, so far it doesn't workDenys Vlasenko
Good news that TLS_RSA_WITH_AES_256_CBC_SHA256 still works with new code ;) This change adds inevitable extension to have different sized hashes and AES key sizes. In libbb, md5_end() and shaX_end() are extended to return result size instead of void - this helps *a lot* in tls (the cost is ~5 bytes per _end() function). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: convert DISP_DIRNAME to a bool variableDenys Vlasenko
function old new delta ls_main 553 548 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: get rid of opt_flags[], handle -l1c through option_mask32Denys Vlasenko
function old new delta display_single 885 888 +3 scan_and_display_dirs_recur 496 486 -10 opt_flags 11 - -11 ls_main 618 553 -65 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/2 up/down: 3/-86) Total: -83 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: handle -x through option_mask32, remove default -C from --helpDenys Vlasenko
function old new delta packed_usage 31024 31002 -22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: handle -d and -R through option_mask32Denys Vlasenko
function old new delta scan_and_display_dirs_recur 545 550 +5 display_single 1039 1044 +5 append_char 67 68 +1 display_files 399 396 -3 ls_main 736 717 -19 opt_flags 68 11 -57 .rodata 168864 168784 -80 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/4 up/down: 11/-159) Total: -148 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: handle -p and -F through option_mask32Denys Vlasenko
function old new delta display_single 1039 1044 +5 append_char 67 68 +1 display_files 399 396 -3 scan_and_display_dirs_recur 545 541 -4 ls_main 736 722 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/3 up/down: 6/-21) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: LIST_ID_NAME/ID_NUMERIC/LOPT/LONG are the same, merge as LONGDenys Vlasenko
Also, handle -n and --full-time using option_mask32 function old new delta scan_and_display_dirs_recur 548 545 -3 display_single 1053 1039 -14 ls_main 777 736 -41 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-58) Total: -58 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: make -Z output compatible with GNU coreutils 8.25Denys Vlasenko
This also makes it clear that LIST_MODEBITS == LIST_LOPT function old new delta ls_main 752 777 +25 display_files 400 399 -1 display_single 1055 1053 -2 my_stat 320 317 -3 packed_usage 32311 32280 -31 .rodata 168895 168864 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/5 up/down: 25/-68) Total: -43 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: LIST_NLINKS/SIZE/DATE_TIME/SYMLINK are always the same, merge as LIST_LOPTDenys Vlasenko
They are always set and cleared together function old new delta append_char 69 68 -1 display_single 910 908 -2 ls_main 677 664 -13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-16) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: handle -s through option_mask32Denys Vlasenko
function old new delta scan_and_display_dirs_recur 493 494 +1 sort_and_display_files 424 423 -1 ls_main 682 677 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: handle -i through option_mask32Denys Vlasenko
function old new delta sort_and_display_files 420 424 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: handle -a and -A through option_mask32Denys Vlasenko
function old new delta ls_main 685 682 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23ls: handle all sort options through option_mask32Denys Vlasenko
function old new delta packed_usage 31007 31024 +17 my_stat 318 324 +6 sort_and_display_files 419 420 +1 print_name 216 217 +1 sortcmp 228 216 -12 opt_flags 96 64 -32 ls_main 732 685 -47 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/3 up/down: 25/-91) Total: -66 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23tls: reorder tls_handshake_data fields for smaller size, tweak commentsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23tls: send EMPTY_RENEGOTIATION_INFO_SCSV in our client helloDenys Vlasenko
Hoped this can make cdn.kernel.org to like us more. Nope. While at it, made error reporting more useful. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23tls: set TLS_DEBUG to 0; placate a gcc indentation warningDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-23separate TLS code into a library, use in in wgetDenys Vlasenko
A new applet, ssl_client, is the TLS debug thing now. It doubles as wget's NOMMU helper. In MMU mode, wget still forks, but then directly calls TLS code, without execing. This can also be applied to sendmail/popmail (SMTPS / SMTP+starttls support) and nc --ssl (ncat, nmap's nc clone, has such option). function old new delta tls_handshake - 1691 +1691 tls_run_copy_loop - 443 +443 ssl_client_main - 128 +128 packed_usage 30978 31007 +29 wget_main 2508 2535 +27 applet_names 2553 2560 +7 ... xwrite_encrypted 360 342 -18 tls_main 2127 - -2127 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 13/8 up/down: 2351/-2195) Total: 156 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-22ls: -1 should be ignored by -l (and options which imply -l)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>