aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | mingw: add routine to pipe a file descriptor to/from a commandRon Yorston2015-05-272-18/+129
| |
* | mingw: define a macro for spawnRon Yorston2015-05-273-5/+5
| |
* | win32: fix waitpid implementationRon Yorston2015-05-271-2/+11
| | | | | | | | _cwait requires a process handle, not a pid.
* | mingw: provide fake getgroups and getgrouplistRon Yorston2015-05-184-4/+28
| | | | | | | | | | This makes it possible to enable the id and groups applets, though the results they return are worthless.
* | mingw: implement getpwnam (but only for current user)Ron Yorston2015-05-182-1/+13
| | | | | | | | This allows the shell to expand ~user.
* | Update default configuration following mergeRon Yorston2015-05-181-1/+3
| |
* | Merge branch 'busybox' into mergeFRPRon Yorston2015-05-1880-411/+832
|\|
| * hush: add recent ash tests to hush testsuite too (they all pass for hush)Denys Vlasenko2015-05-1818-0/+29
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * testsuite: add some tests for ashRon Yorston2015-05-1810-0/+15
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix breakage of ${v/pat/str}Ron Yorston2015-05-181-51/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit ash: move parse-time quote flag detection to run-time breaks pattern substitution in parameter expansion. Fix this and revise the code so that the different handling of the pattern and the replacement string takes place in rmescapes rather than the separate function parse_sub_pattern. function old new delta rmescapes 227 273 +46 static.qchars 3 4 +1 subevalvar 1177 1157 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 47/-20) Total: 27 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: move parse-time quote flag detection to run-timeRon Yorston2015-05-185-98/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the parser does not recursively parse parameter expansion with respect to quotes, we can't accurately determine quote status at parse time. This patch works around this by moving the quote detection to run-time where we do interpret it recursively. Test case: foo=\\ echo "<${foo#[\\]}>" Old result: <\> New result: <> Do not quote back slashes in parameter expansions outside quotes. Test case: a=/b/c/* b=\\ echo ${a%$b*} Old result: /b/c/* New result: /b/c/ Based on commits 880d952, 7cfd8be, 0d7d660 and a7c21a6 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta argstr 1164 1193 +29 memtodest 147 174 +27 subevalvar 1153 1177 +24 redirect 1279 1282 +3 dolatstr 5 7 +2 static.spclchars 10 9 -1 expandarg 962 960 -2 evalcase 273 271 -2 evalcommand 1204 1197 -7 rmescapes 236 227 -9 preglob 27 8 -19 evalvar 604 582 -22 cmdputs 389 334 -55 readtoken1 3163 3061 -102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/9 up/down: 85/-219) Total: -134 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: remove arithmetic expansion collapsing at parse timeRon Yorston2015-05-183-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collapsing arithmetic expansion is incorrect when the inner arithmetic expansion is a part of a parameter expansion. Test case: unset a echo $((3 + ${a:=$((4 + 5))})) echo $a Old result: 12 (4 + 5) New result: 12 9 Based on commit bb777a6 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta readtoken1 3180 3163 -17 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: remove superfluous code in arithmetic modeRon Yorston2015-05-181-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on commits 1a74845, cfc3d6a and ff13779 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta evalcommand 1197 1204 +7 localcmd 327 325 -2 readtoken1 3200 3180 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 7/-22) Total: -15 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: do not expand tilde in parameter expansion within quotesRon Yorston2015-05-183-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test case: unset a echo "${a:-~root}" Old result: /root New result: ~root Based on commit 170f44d from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta evalvar 598 604 +6 parse_command 1440 1443 +3 localcmd 325 327 +2 readtoken1 3199 3200 +1 argstr 1180 1164 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 12/-16) Total: -4 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: perform tilde expansion in all parameter expansion wordsRon Yorston2015-05-183-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously tilde expansion was not carried out for =?#% expansion words. Test case: a=~root:~root echo ${a#~root} Old result: /root:/root New result: :/root Based on commit dd721f71 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta subevalvar 1152 1153 +1 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: code shrink around varvalueRon Yorston2015-05-181-46/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on commit c989d72 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta strtodest - 40 +40 memtodest 123 147 +24 parse_command 1443 1440 -3 readtoken1 3205 3199 -6 argstr 1203 1180 -23 varvalue 788 660 -128 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/4 up/down: 64/-160) Total: -96 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: explain what "local -" doesDenys Vlasenko2015-05-131-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: consider "local -" case while iterating over local variables in mklocal.Eugene Rudoy2015-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | fixes segfault introduced in 0a0acb55db8d7c4dec445573f1b0528d126b9e1f with functions using "local -". test-case: f() { local -; local x; }; f note: with this change applied multiple 'local -'s still cause multiple entries to be added to the localvars list. this problem will be addressed in a separate commit. Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: Enable support for !CONFIG_MULTIUSERDaniel Thompson2015-05-121-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux recently gained a new config option, CONFIG_MULTIUSER, that makes support for non-root users optional. This results in a number of syscalls being disabled: setuid, setregid, setgid, setreuid, setresuid, getresuid, setresgid, getresgid, setgroups, getgroups, setfsuid, setfsgid, capget, capset. Currently a number of busybox applets, including login, struggle to run when CONFIG_MULTIUSER is disabled. Even the root user is unable to login: login: can't set groups: Functi This patch adds code to make change_identity() a nop on single user systems. It works by recognising the signature errno value (ENOSYS, due to the system calls being disabled) and, to avoid security risks, only deploys when the current uid and target uid is the same. After the patch is applied any attempt to switch to a non-root user will fail. Thus a badly configured userspace (for example, one that tries to start a daemon as a non-root user when the kernel cannot support this) will report errors as one would expect. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2c-tools: only try /dev/i2c/* if opening /dev/i2c-* fails with ENOENTBartosz Golaszewski2015-05-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to access /dev/i2c/* on every error after opening /dev/i2c-* can mislead users who e.g. don't have root access. Instead of bailing-out with "permission denied" we currently print "no such file or directory". Fix it by trying open("/dev/i2c/%d") only if we got ENOENT. Upstream i2cdetect tries to get any info it can from /sys and /proc even when invoked by an unprivileged user, but we don't want to add unnecessary bloat. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2c-tools: fix 'i2cdetect -l'Bartosz Golaszewski2015-05-111-1/+4
| | | | | | | | | | | | | | | | Calling 'i2cdetect -l' only displays usage and exits. Fix it by correctly parsing command-line arguments. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bzcat.tests: Run both .gz and .bz2 tests, and add .Z testsThiago Jung Bauermann2015-05-111-24/+50
| | | | | | | | | | Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: do not try to decode GNU extended headers as pax headersDenys Vlasenko2015-05-111-11/+17
| | | | | | | | | | | | | | function old new delta get_header_tar 1736 1692 -44 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Conditionalize Bionic workarounds on __ANDROID_API__Matt Whitlock2015-05-031-4/+10
| | | | | | | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bionic lacks mempcpy; enable existing workaroundMatt Whitlock2015-05-031-0/+1
| | | | | | | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libarchive: auto-detect .Z files as wellThiago Jung Bauermann2015-05-031-0/+7
| | | | | | | | | | Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fixDenys Vlasenko2015-05-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vi: basic undo feature shouldn't depend on yankmarkAndrew Fuller2015-05-031-5/+5
| | | | | | | | | | | | | | | | | | Currently basic undo functionality with the 'u' key depends on FEATURE_VI_YANKMARK. These two features are separate, so we can remove this dependency. Signed-off-by: Andrew Fuller <abf@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: add support for compression levels 4-9Aaro Koskinen2015-04-261-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta gzip_main 192 282 +90 static.gzip_level_config - 24 +24 packed_usage 30439 30459 +20 fill_window 216 220 +4 pack_gzip 1789 1729 -60 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 138/-60) Total: 78 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bionic lacks tcdrain; provide a workaroundMatt Whitlock2015-04-261-0/+5
| | | | | | | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bionic lacks ttyname_r; provide a workaroundMatt Whitlock2015-04-252-0/+26
| | | | | | | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * special-case {true,false,test} --helpDenys Vlasenko2015-04-214-28/+21
| | | | | | | | | | | | | | | | | | | | This also removes their help texts. function old new delta run_applet_no_and_exit 442 452 +10 packed_usage 30713 30625 -88 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * include: Fallback to UTMP unless there is UTMPX supportBernhard Reutner-Fischer2015-04-201-1/+24
| | | | | | | | | | | | Fixes compilation against uClibc-0.9.30 for instance Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * libbb: remove unnecessary argument to nonblock_immune_readRon Yorston2015-04-203-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop_on_EINTR argument to nonblock_immune_read is always set to 1. function old new delta xmalloc_reads 200 195 -5 pgetc 488 483 -5 argstr 1313 1308 -5 nonblock_immune_read 123 86 -37 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-52) Total: -52 bytes Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mdev: if a "future" mdev.seq is seen, do not overwrite it with oursDenys Vlasenko2015-04-191-7/+22
| | | | | | | | | | | | | | | | | | | | | | This was seen to happen if two mdevs are run in parallel, mdev.seq is empty, and the "newer" one manages to write it first. function old new delta mdev_main 1366 1388 +22 atoll - 20 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mdev: improve loggingDenys Vlasenko2015-04-191-4/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: document buggy handling of duplicate "local"Denys Vlasenko2015-04-182-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix handling of duplicate "local"Denys Vlasenko2015-04-184-17/+42
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: implement ",+N" range endDenys Vlasenko2015-04-172-5/+68
| | | | | | | | | | | | | | | | | | | | | | function old new delta add_cmd 1115 1173 +58 process_files 2226 2253 +27 sed_main 696 702 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 91/0) Total: 91 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * uevent: new appletDenys Vlasenko2015-04-161-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applet listens on netlink socket with kernel's uevent messages. Run-tested. function old new delta uevent_main - 416 +416 packed_usage 30671 30713 +42 applet_names 2531 2538 +7 applet_main 1468 1472 +4 RCVBUF - 4 +4 applet_nameofs 734 736 +2 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 4/0 up/down: 475/0) Total: 475 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find: fix regression in status processing for path argumentsFelix Fietkau2015-04-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression added in commit 14158b4127dba30466c50147b868a6a89702960b "find: add optional support for '-exec ... {} +'" This commit causes find to exit on the first path argument that was not found, which breaks existing scripts and is incompatible to other implementations. Instead of exiting on the first failure, return EXIT_FAILURE at the end if any error occurred. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * volume_id: fix a buglet introduced by is_prefixed_with() conversionAlfonso Ranieri2015-04-141-1/+1
| | | | | | | | | | Signed-off-by: Alfonso Ranieri <alforan@tin.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: make CONFIG_EXTRA_LDFLAGS go to LDFLAGS, not EXTRA_LDFLAGSDenys Vlasenko2015-04-142-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * update copyright yearsAaro Koskinen2015-04-021-1/+1
| | | | | | | | | | | | | | | | Copyright years seem to be out of date, e.g. coreutils/truncate.c has Copyright (C) 2015. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * *: Switch to POSIX utmpx APIBernhard Reutner-Fischer2015-04-029-52/+56
| | | | | | | | | | | | | | | | | | | | UTMP is SVID legacy, UTMPX is mandated by POSIX. Glibc and uClibc have identical layout of UTMP and UTMPX, both of these libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing changes except the names of the API entrypoints. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * update example ntp.scriptDenys Vlasenko2015-03-311-2/+19
| | | | | | | | | | | | | | Handle an interesting corner case when NTP server is reachable... but on a different IP now. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: change_identity() must be after chroot()Denys Vlasenko2015-03-311-20/+21
| | | | | | | | | | | | Otherwise chroot() doesn't work for non-root Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fixDenys Vlasenko2015-03-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Update README.mdRon Yorston2015-04-301-1/+1
| |
* | mingw: enable a minimal version of nc by defaultRon Yorston2015-04-222-4/+4
| |