aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-04libbb: new function bb_getgroups() - allocating wrapper around getgroups()Denys Vlasenko
function old new delta bb_getgroups - 111 +111 nexpr 843 757 -86 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/1 up/down: 111/-86) Total: 25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-04setpriv: prepare option parsing logic for additional optsPatrick Steinhardt
The current option parsing logic of setpriv only supports the case where we want to execute a sub-program and have at most one argument. Refactor handling of options to solve these shortcomings to make it easy to support 'setpriv --dump', which does not accept any additional arguments, as well as the case where additional options are passed to setpriv. This is done by handling 'argc' ourselves, throwing an error when no program is specified, as well as introducing an enum for the different option bitmasks. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-04setpriv: do not process remaining argsPatrick Steinhardt
By default, the 'getopt32' call will continue parsing the command line even after hitting a non-option string. But in setpriv, this should be avoided, as all parameters following the initial non-option argument are in fact arguments to the binary that is to be executed by setpriv. Otherwise, calling e.g. 'busybox setpriv ls -l' would result in an error due to the unknown parameter "-l". Fix the issue by passing "+" as the first character in the options string. This will cause 'getopt32' to stop processing after hitting the first non-option. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-04tls: use capped SNI len everywhereDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-04bzcat: compile bunzip2_main() if BZCAT.Denys Vlasenko
Currently, BZCAT (and BUNZIP2) selects FEATURE_BZIP2_DECOMPRESS, thus, "#if ENABLE_FEATURE_BZIP2_DECOMPRESS" around bunzip2_main() is sufficient. But let's robustify it. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-04Change BB_EXTRA_VERSION: now it needs to contain any spaces/parenthesisDenys Vlasenko
Before this change, BB_EXTRA_VERSION of "" resulted in: "BusyBox v1.28.0.git () multi-call binary" message, after the fix it is: "BusyBox v1.28.0.git multi-call binary" While at it, eliminate BB_BT and BANNER single-use macros. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03fixes for bugs found by make_single_applets.shDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03msh: delete this appletDenys Vlasenko
It's deprecated since 2009 and interferes with make_single_applets.sh tests. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03Start 1.28.0 development cycleDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03Bump version to 1.27.0Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03scripts/randomtest: update things which can't be tested on uclibcDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-01ash: fix $HOME/.profile reading if !ASH_EXPAND_PRMT, take 2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-01ash: fix 'trap - 65'Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-28udhcpc6: make -O OPT workDenys Vlasenko
Patch is based on work by tiggerswelt.net. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-28modutils: delete unused replace_underscores()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-27udhcpc6: add comments about option 39, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-27ash: fix $HOME/.profile reading if !ASH_EXPAND_PRMTDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-26pgrep: implement -aDenys Vlasenko
function old new delta pgrep_main 640 726 +86 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-26udhcpc6: add support for timezonesDenys Vlasenko
Basedon patch by Bernd Holzmüller <bernd.holzmueller@tiggerswelt.net> function old new delta option_to_env 504 580 +76 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-26pgrep: fix pgrep -flx "sleep 11" - saw "sleep 11" processes as "sleep 11 "Denys Vlasenko
function old new delta pgrep_main 584 597 +13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-15archival: add option -k "keep" to gzip/bzip2/lzop, add -U "nokeep" to lzopDenys Vlasenko
function old new delta bbunpack 745 779 +34 lzop_main 93 121 +28 do_lzo_compress 320 328 +8 packed_usage 31685 31653 -32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 70/-32) Total: 38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-15fix "ifdef ENABLE_foo": should always be "#if ENABLE_foo"Denys Vlasenko
function old new delta pack_gzip 1729 1789 +60 fill_window 220 216 -4 static.gzip_level_config 24 - -24 gzip_main 275 192 -83 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/2 up/down: 60/-111) Total: -51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-14unshare: fix help text; select LONG_OPTS instead depending on themDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-14setpriv: new appletAssaf Gordon
Add a minimal 'setpriv' implementation supporting the NO_NEW_PRIVS bit. Typical usage: $ busybox setpriv sudo uname Linux $ busybox setpriv --nnp sudo uname sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges? function old new delta packed_usage 31580 31685 +105 setpriv_main - 87 +87 prctl - 53 +53 static.setpriv_longopts - 22 +22 applet_names 2620 2628 +8 applet_main 1516 1520 +4 ------------------------------------------------------------------------------ (add/remove: 5/0 grow/shrink: 3/0 up/down: 279/0) Total: 279 bytes Signed-off-by: Assaf Gordon <assafgordon@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-13iproute: support for filtering by and printing of scopeAndré Draszik
This patch adds filtering by and printing of 'scope' to the ip route command, taken from the upstream ip command. x86_64: function old new delta iproute_list_or_flush 1548 1674 +126 print_route 2394 2469 +75 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 201/0) Total: 201 bytes mipsel: iproute_list_or_flush 1952 2096 +144 print_route 2580 2696 +116 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/0 up/down: 260/0) Total: 260 bytes Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-13tar: add IF_FEATURE_* checksMing Liu
A following linking error was observed: | ========== | archival/lib.a(tar.o): In function `tar_main': | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined | ld: final link failed: Bad value this happened with clang compiler, with the following configs: | CONFIG_TAR=y | # CONFIG_FEATURE_SEAMLESS_Z is not set which can be fixed by adding IF_FEATURE_* checks in. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-06-13ip rule: add suppress_{prefixlength,ifgroup} optionsStefan Tomanek
function old new delta iprule_modify 816 887 +71 print_rule 610 680 +70 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 141/0) Total: 141 bytes Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-26ash: fix incorrect path in describe_commandYoufu Zhang
$ PATH=/extra/path:/usr/sbin:/usr/bin:/sbin:/bin \ > busybox sh -xc 'command -V ls; command -V ls; command -Vp ls; command -vp ls' + command -V ls ls is /bin/ls + command -V ls ls is a tracked alias for /bin/ls + command -Vp ls ls is a tracked alias for (null) + command -vp ls Segmentation fault describe_command should respect `path' argument. Looking up in the hash table may gives incorrect index in entry.u.index and finally causes incorrect output or SIGSEGV. function old new delta describe_command 386 313 -73 Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-26ls: fix support for long options when FEATURE_LS_COLOR is deselectedLaurent Bercot
Declaration of ls_longopts and initialization of applet_long_options were incorrectly guarded with ENABLE_FEATURE_LS_COLOR; that yielded a "ls: NO_OPT: \xff" error message when long options were selected and color support was not. This patch ensures long options are initialized separately from color support. Signed-off-by: Laurent Bercot <ska-dietlibc@skarnet.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-26add/remove-shell: copy /etc/shells mode to new fileDenys Vlasenko
function old new delta add_remove_shell_main 259 300 +41 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-22ash,hush: fix SIGCHLD interrupting read builtinDenys Vlasenko
function old new delta readcmd 169 217 +48 shell_builtin_read 1087 1097 +10 localcmd 366 364 -2 builtin_read 197 193 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 58/-6) Total: 52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-15sv: update to match version 2.1.2 of runitJames Byrne
Backport from upstream versions: 2.1.2 Sun, 10 Aug 2014 18:01:54 +0000 * sv.c: properly format status command's output on failure cases. * sv.c: support optional LSB init script actions reload and try-restart. * sv.c: fix typo that may lead to wrong output from sv when reporting status of multiple service directories. 2.1.1 Sun, 04 Oct 2009 20:28:38 +0000 * sv.c: on 'down', send runsv the 'down' command properly if not yet done (e.g. when taken up with 'once'). [Remove previous workaround added to BusyBox version]. 1.9.0 Mon, 05 May 2008 22:00:13 +0000 * sv.c: service name is also relative to the current directory if it ends with a slash. 1.8.0 Fri, 21 Sep 2007 00:33:56 +0000 * sv.c: fix race on check for down if pid is 0 and state is run or finish. 1.7.1 Sat, 04 Nov 2006 19:23:29 +0000 * sv.c: properly wait for a service to be restarted on 'restart'; support checks through -v for pause, cont, kill. function old new delta sv 1184 1280 +96 control 132 180 +48 status 118 139 +21 out 64 85 +21 svstatus_print 334 344 +10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 196/0) Total: 196 bytes Signed-off-by: James Byrne <james.byrne at origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-15runsv: update to match version 2.1.2 of runitDenys Vlasenko
Backport from upstream versions: 2.1.0 Thu, 24 Sep 2009 22:49:33 +0000 * runsv.c: exit with error if [log/]supervise/control exists, but is not a fifo. [Code abstracted into a separate function to make it more compact for BusyBox.] 1.9.0 Mon, 05 May 2008 22:00:13 +0000 * runsv.c: create temporary new status files for log/supervise/ actually in log/supervise/. 1.7.2 Tue, 21 Nov 2006 15:13:47 +0000 * runsv.c: really don't act on commands in state finish; minor. function old new delta open_control - 135 +135 update_status 553 612 +59 custom 223 242 +19 ctrl 426 422 -4 warn_cannot 21 10 -11 runsv_main 1786 1662 -124 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/3 up/down: 213/-139) Total: 74 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-15svlogd.c: support -ttt (dateTtime instead of date_time)Denys Vlasenko
Backport from upstream version: 1.7.0 Sat, 07 Oct 2006 18:24:17 +0000 * svlogd.c: new option -ttt: prefix log messages with sortable UTC timestamp YYYY-MM-DDTHH:MM:SS.xxxxx. function old new delta svlogd_main 1429 1454 +25 packed_usage 31575 31580 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-08udhcpc: do not accept --background on NOMMU (same as -b)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-08udhcpc: fix "udhcpc -x hostname:<name> not working on nommu"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-05diff: fix -N and nonexistent files. Closes 7454Denys Vlasenko
function old new delta diffreg 1253 1310 +57 diff_main 1329 1355 +26 create_J 1819 1821 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 85/0) Total: 85 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-05-02vi: survive if stdin is nonblocking. closes 9851Denys Vlasenko
function old new delta readit 55 69 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-28time: inplement -f FMTDenys Vlasenko
function old new delta time_main 1076 1134 +58 packed_usage 31577 31572 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-28time: implement -a, -o FILETommi Rantala
function old new delta time_main 1052 1076 +24 packed_usage 31571 31577 +6 Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-28time: document -p in usageTommi Rantala
Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-18lsscsi: new appletMarkus Gothe
function old new delta lsscsi_main - 326 +326 applet_names 2613 2620 +7 applet_main 1512 1516 +4 applet_install_loc 189 190 +1 packed_usage 31566 31560 -6 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/1 up/down: 338/-6) Total: 332 bytes Signed-off-by: Markus Gothe <nietzsche@lysator.liu.se> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-17Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko
By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-17factor: fix stray semicolonDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-14factor: support "no-argvs" usageDenys Vlasenko
function old new delta factorize_numstr - 72 +72 packed_usage 31562 31566 +4 factor_main 109 101 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 76/-8) Total: 68 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-13libbb: fix "error: redefinition of 'is_tty_secure'"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-13factor: improve comments for sieving logic... also fix a typoDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-13fix "loginutils/Config.in:319 error: Overlong line"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-13factor: improve comments for sieving logicDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>