aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * hush: fix quoted_punct.tests failureDenys Vlasenko2017-07-054-3/+83
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix escaping of a few characters (broken by last commits)Denys Vlasenko2017-07-053-2/+83
| | | | | | | | | | | | | | Add a testcase which tests all ASCII punctuation escapes. NB: hush is failing this test! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: tweak in commentDenys Vlasenko2017-07-051-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: note which versions of glibc exhibit "rho bug"Denys Vlasenko2017-07-051-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix matching of unicode greek letter rho (cf 81) and similar casesDenys Vlasenko2017-07-055-1/+90
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * setpriv: dump user and group infoDenys Vlasenko2017-07-041-3/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setpriv from util-linux has an option to dump the current state regarding privilege settings via '--dump'. It prints out information on the real and effective user and group IDs, supplementary groups, the no-new-privs flag, the capability sets as well as secure bits. This patch is the start of supporting this mode. To make introduction of the '--dump' easier to reason about, its introduction has been split into multiple patches. This particular one introduces the ability to print out user and group information of the current process. function old new delta setpriv_main 89 322 +233 getresuid - 41 +41 getresgid - 41 +41 static.setpriv_longopts 22 29 +7 packed_usage 31675 31669 -6 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 2/1 up/down: 322/-6) Total: 316 bytes Patch by Patrick Steinhardt <ps@pks.im> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: new function bb_getgroups() - allocating wrapper around getgroups()Denys Vlasenko2017-07-043-26/+63
| | | | | | | | | | | | | | | | | | | | 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>
| * setpriv: prepare option parsing logic for additional optsPatrick Steinhardt2017-07-041-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * setpriv: do not process remaining argsPatrick Steinhardt2017-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tls: use capped SNI len everywhereDenys Vlasenko2017-07-041-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bzcat: compile bunzip2_main() if BZCAT.Denys Vlasenko2017-07-041-1/+1
| | | | | | | | | | | | | | | | 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>
| * Change BB_EXTRA_VERSION: now it needs to contain any spaces/parenthesisDenys Vlasenko2017-07-042-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * fixes for bugs found by make_single_applets.shDenys Vlasenko2017-07-0310-41/+75
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * msh: delete this appletDenys Vlasenko2017-07-0312-31/+3
| | | | | | | | | | | | It's deprecated since 2009 and interferes with make_single_applets.sh tests. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Start 1.28.0 development cycleDenys Vlasenko2017-07-031-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bump version to 1.27.01_27_0Denys Vlasenko2017-07-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * scripts/randomtest: update things which can't be tested on uclibcDenys Vlasenko2017-07-031-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2017-07-033-3/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix $HOME/.profile reading if !ASH_EXPAND_PRMT, take 2Denys Vlasenko2017-07-011-8/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix 'trap - 65'Denys Vlasenko2017-07-011-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: make -O OPT workDenys Vlasenko2017-06-286-58/+149
| | | | | | | | | | | | Patch is based on work by tiggerswelt.net. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modutils: delete unused replace_underscores()Denys Vlasenko2017-06-282-7/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: add comments about option 39, no code changesDenys Vlasenko2017-06-272-2/+42
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix $HOME/.profile reading if !ASH_EXPAND_PRMTDenys Vlasenko2017-06-271-6/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pgrep: implement -aDenys Vlasenko2017-06-261-6/+16
| | | | | | | | | | | | | | function old new delta pgrep_main 640 726 +86 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: add support for timezonesDenys Vlasenko2017-06-262-48/+59
| | | | | | | | | | | | | | | | | | 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>
| * pgrep: fix pgrep -flx "sleep 11" - saw "sleep 11" processes as "sleep 11 "Denys Vlasenko2017-06-261-5/+11
| | | | | | | | | | | | | | function old new delta pgrep_main 584 597 +13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * archival: add option -k "keep" to gzip/bzip2/lzop, add -U "nokeep" to lzopDenys Vlasenko2017-06-154-43/+81
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * fix "ifdef ENABLE_foo": should always be "#if ENABLE_foo"Denys Vlasenko2017-06-152-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * unshare: fix help text; select LONG_OPTS instead depending on themDenys Vlasenko2017-06-141-3/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * setpriv: new appletAssaf Gordon2017-06-141-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * iproute: support for filtering by and printing of scopeAndré Draszik2017-06-131-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tar: add IF_FEATURE_* checksMing Liu2017-06-131-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ip rule: add suppress_{prefixlength,ifgroup} optionsStefan Tomanek2017-06-131-27/+46
| | | | | | | | | | | | | | | | | | | | | | 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>
* | grep: remove hack to disable EXTRA_COMPATRon Yorston2017-07-183-12/+2
| | | | | | | | | | | | | | | | The hack to disable EXTRA_COMPAT in grep was incomplete and left the -z option enabled but non-functional. Remove the hack and change the default MinGW configurations to disable EXTRA_COMPAT.
* | Use %I64* formats with MinGW instead of %ll* formatsJohannes Schindelin2017-07-1811-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The MSVC runtime uses the format specified %I64 for 64-bit data types; It does not understand e.g. %llu for unsigned long longs. However, mingw-w64 provides a compatibility mode in its runtime wrapper which can be activated by defining the constant __USE_MINGW_ANSI_STDIO=1 in which case we must refrain from overriding the %ll* formats. This fixes quite a couple of compile warnings when building with the mingw-w64 compiler. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | win32/regex: fix compile warningsJohannes Schindelin2017-07-144-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are plenty of warnings that were not detected in Git's source code, due to some warnings being turned off in Git's build by default (even with DEVELOPER=1). The warnings fall into three categories: - constants being tested via `#if <name>` instead of `#ifdef <name>` - unused function parameters - one instance of an unnecessarily-shadowing variable This patch fixes all of them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | win32/regex: update to newest version in GitJohannes Schindelin2017-07-146-5109/+11169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 909696f13 (win32: Import regex source, 2010-04-14), Git's compat/regex/ was imported wholesale, with one change (to avoid redefining _GNU_SOURCE). For the record, the git.git commit mentioned in that commit message refers to a transient commit made to git.git's `next` branch which is rewound with every major Git version, therefore it is long gone. Also for the record, the correct reference would be: 3632cfc2487 (Use compatibility regex library for OSX/Darwin, 2008-09-07), i.e. the compat/regex/ source code as of Git v1.6.0.2. This commit updates the regex source code to that of Git v2.13.2, or bd8f0055836 (regex: fix a SIZE_MAX macro redefinition warning, 2016-06-07) in git.git. Instead of the original fixup to avoid redefining _GNU_SOURCE, we now require these changes relative to Git's source code: > diff --git a/win32/regex.c b/win32/regex.c > index 5cb23e5d5..95e5d757a 100644 > --- a/win32/regex.c > +++ b/win32/regex.c > @@ -18,9 +18,11 @@ > Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > 02110-1301 USA. */ > > -#ifdef HAVE_CONFIG_H > -#include "config.h" > -#endif > +#define HAVE_LIBINTL_H 0 > +#define ENABLE_NLS 0 > +#define HAVE_ALLOCA 0 > +#define NO_MBSUPPORT 1 > +#define GAWK 1 > > /* Make sure no one compiles this code with a C++ compiler. */ > #ifdef __cplusplus Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | grep: prepare for an upgrade of the regex codeJohannes Schindelin2017-07-141-1/+3
| | | | | | | | | | | | | | The upcoming updated regex code will already define the RE_TRANSLATE_TYPE constant, so let's safeguard lest we redefine it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | ash: fix POSIX buildRon Yorston2017-07-141-5/+5
| |
* | kbuild: avoid warning when building with KBUILD_NO_NLSJohannes Schindelin2017-07-141-3/+3
| | | | | | | | | | | | | | The return values of bindtextdomain() and textdomain() are not actually used at all... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | kbuild: simulate force-renaming on WindowsJohannes Schindelin2017-07-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling rename() when a file with the target name exists already fails on Windows. Let's simply delete the target file, if it exists. This is usually a dangerous thing as it leaves time between deleting and renaming, during which (theoretically) another thread or process could have created the same file, and the rename() would fail again. Practically, we are talking about the kbuild system used to configure the build, where it does not matter, as we do not expect any other thread or process to interfere with the configuration files. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | kbuild: support at least non-interactive mode on WindowsJohannes Schindelin2017-07-145-3/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without POSIX, kbuild has some trouble compiling its support executables. Luckily, the parts that really lean on POSIX functionality are pretty much all only needed when configuring the build interactively. When compiling BusyBox for Win32, we do not actually need interactive configuration at all: we simply choose the default. Therefore, a lot of the stuff that is typically built for the Kconfig system is totally unnecessary (such as: compiling documentation via fork()&exec(), changing the window size, etc). Liberally put all of the problematic code behind #ifndef __MINGW32__ guards, just to get `make mingw64_defconfig` going in Git for Windows' SDK (which is a special-purpose version of MSYS2). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | fixdep: fix assumption that `long` is as large as `void *`Johannes Schindelin2017-07-144-33/+34
| | | | | | | | | | | | | | | | | | | | | | It is not. At least not in general. And in particular not on 64-bit Windows, where sizeof(long) == 4. What the code wanted to use is actually called intptr_t. Note: `intptr_t` is a C99 feature. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | fixdep: be careful about handling empty lines correctlyJohannes Schindelin2017-07-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code without this patch is seriously flawed, as it can easily overrun the buffer while looking for the *beginning* of the line. The symptom when trying to build without this patch in Git for Windows' SDK (which is a special-purpose version of MSYS2) is: $ make mingw64_defconfig && make -j15 HOSTCC scripts/basic/fixdep make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 127 make: *** [Makefile:358: scripts_basic] Error 2 make: *** [Makefile:358: scripts_basic] Error 2 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | fixdep: read the dependency files in binary modeJohannes Schindelin2017-07-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to make sure that the original line endings are preserved, as fixdep hardcodes the assumption of Unix-type line endings. The symptom is this (kinda hard to understand) error when building in Git for Windows' SDK (which is a special-purpose version of MSYS2): $ make mingw64_defconfig && make -j15 HOSTCC scripts/basic/fixdep C:/git-sdk-64/mingw64/x86_64-w64-mingw32/include/ctype.h 64-w64-mingw32/include/ctype.h: Invalid argument fixdep: make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 2 make: *** [Makefile:358: scripts_basic] Error 2 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | Revert "nc: use poll() instead of select()"Ron Yorston2017-05-291-16/+17
| | | | | | | | This reverts commit 5b3b468ec0c6e6dfe772722dbd6b2c57cef817b5.
* | Update default configurationsRon Yorston2017-05-292-38/+60
| |
* | Merge branch 'busybox' into mergeRon Yorston2017-05-29133-2815/+3349
|\|
| * ash: fix incorrect path in describe_commandYoufu Zhang2017-05-261-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 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>