aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * build: add a sanitizer debug optionMike Frysinger2016-02-122-0/+15
| | | | | | | | | | | | | | | | | | Building & running with ASAN is super helpful, so add a dedicated config knob for it. This way people don't have to guess at the right compiler settings in order to get a good build. We can just tell people to enable this one option. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * networking: allow dot at the end of the domain name in dhcp responseDenys Vlasenko2016-02-111-0/+2
| | | | | | | | | | | | Patch based on Balaji Punnuru <balaji.punnuru@gmail.com> work. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * init: make the command-line rewrite optionalNicolas Carrier2016-02-111-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When launched as PID 1 and after parsing its arguments, init wipes all all of them except argv[0] and rewrites argv[0] to contain only "init", so that its command-line appears solely as "init" in tools such as ps. This patch adds the FEATURE_INIT_MODIFY_CMDLINE which, if set to n, will make init preserve all its arguments including argv[0], be they parsed or ignored. The original command-line used to launch init can then be retrieved in /proc/1/cmdline on Linux, for example. Signed-off-by: Nicolas Carrier <nicolas.carrier@parrot.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: shorter messageDenys Vlasenko2016-02-101-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: step when |offset| > 1 sec, not 0.125 secDenys Vlasenko2016-02-101-18/+36
| | | | | | | | | | | | | | | | | | | | update_local_clock 769 820 +51 recv_and_process_peer_pkt 838 862 +24 reset_peer_stats 137 133 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 75/-4) Total: 71 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * busybox: fix uninitialized memory when displaying IPv6 addressesFelix Fietkau2016-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | After commit 8e74adab0107658e3dc04ed342206272a284f43e ("libbb: make INET[6]_rresolve use sockaddr2{host,dotted}_noport") INET_sprint6 uses more than just sin6_addr, it also tries to display the scope id, which is uninitialized when called from ife_print6. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dd: support iflag=skip_bytesRafał Miłecki2016-02-012-27/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It allows specifying amount of bytes directly (not only amount of blocks) is also supported by GNU's Coreutils. function old new delta parse_comma_flags - 93 +93 static.iflag_words - 12 +12 dd_main 1569 1580 +11 packed_usage 30591 30600 +9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/0 up/down: 125/0) Total: 125 bytes Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix compiling with musl's utmp stubsKylie McClain2016-02-014-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes compiling busybox with FEATURE_UTMP and _WTMP enabled. musl, while not really support utmp/wtmp, provides stub functions, as well as variables such as _PATH_UTMP, so that programs using utmp or wtmp can still compile fine. My reasoning for this patch is that on Exherbo, I'm currently trying to get us to be able to use the same busybox config file for both glibc and musl systems, using utmp/wtmp on systems that support it, and using the stubs on musl without needing two different configs. As of latest musl git, it provides all utmp functions needed; 1.1.12 doesn't, but I sent a patch to Rich to add the utmp{,x}name functions expected to exist, which was merged into musl upstream. Signed-off-by: Kylie McClain <somasissounds@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * printf: short-circuit output when argument to %b includes \cRon Yorston2016-01-311-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | printf wasn't correctly handling \c in an argument to the %b format specifier. printf %bXX OK\\c returned 'OK\cXX' rather than the expected 'OK'. function old new delta printf_main 886 899 +13 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: make 's///w FILE' actually write to FILE. Closes 8251Denys Vlasenko2016-01-242-4/+13
| | | | | | | | | | | | | | function old new delta add_cmd 1167 1210 +43 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * patch: correctly handle "patch FILE_TO_PATCH" form. Closes 7736Denys Vlasenko2016-01-231-6/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dos2unix: try to preserve ownership. closes 8311Denys Vlasenko2016-01-171-9/+11
| | | | | | | | | | | | | | function old new delta dos2unix_main 426 441 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * setsid: implement -cDenys Vlasenko2016-01-171-6/+13
| | | | | | | | | | | | | | | | function old new delta setsid_main 53 96 +43 packed_usage 30846 30833 -13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * truncate: use O_WRONLY|O_NONBLOCKMike Frysinger2016-01-131-1/+1
| | | | | | | | | | | | | | This matches coreutils behavior. We don't read the fd, and truncation does not need blocking. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * truncate: always set mode when opening file to avoid fortify errorsAri Sundholm2016-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Busybox crashes due to no mode being given when opening: $ ./busybox truncate -s 1M foo *** invalid open64 call: O_CREAT without mode ***: ./busybox terminated ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f] /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c] /lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa] ./busybox[0x4899f9] ======= Memory map: ======== 00400000-004d0000 r-xp 00000000 00:1a 137559 /home/ari/busybox/busybox 006cf000-006d0000 r--p 000cf000 00:1a 137559 /home/ari/busybox/busybox 006d0000-006d1000 rw-p 000d0000 00:1a 137559 /home/ari/busybox/busybox 006d1000-006d4000 rw-p 00000000 00:00 0 014e7000-01508000 rw-p 00000000 00:00 0 [heap] 7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so 7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so 7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so 7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so 7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0 7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so 7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so 7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so 7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so 7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so 7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0 7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0 7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so 7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so 7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0 7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0 [stack] 7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Aborted (core dumped) $ Fix this by simply always setting the mode, as it doesn't hurt even when O_CREAT is not specified. This bug is a regression introduced in fc3e40e, as xopen(), which was originally used, would automatically set the mode. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * login: add commented-out PAM double password avoidance from BZ 4003Denys Vlasenko2016-01-031-0/+43
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nandwrite: implement -n (read/write without ecc)Aaro Koskinen2016-01-021-8/+14
| | | | | | | | | | | | | | Implement -n (read/write without ecc). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * blkdiscard: new appletAri Sundholm2016-01-021-0/+83
| | | | | | | | | | | | | | | | function old new delta blkdiscard_main - 264 +264 Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: suppress a compilation warningCristian Ionescu-Idbohrn2016-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | Reported by gcc (Debian 5.3.1-4) 5.3.1 20151219 shell/ash.c: In function 'evaltree': shell/ash.c:8432:19: warning: logical not is only applied to the left hand side of comparison Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mount: support "nofail" option. Closes 8551Denys Vlasenko2015-12-301-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta singlemount 1045 1060 +15 mount_option_str 338 345 +7 mount_it_now 355 361 +6 mount_options 172 176 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 32/0) Total: 32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * iproute: support "scope". Closes 8561Denys Vlasenko2015-12-301-19/+33
| | | | | | | | | | | | | | function old new delta iproute_modify 1051 1120 +69 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * swaponoff: fix compile-time warningDenys Vlasenko2015-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | CC util-linux/swaponoff.o cc1: warnings being treated as errors util-linux/swaponoff.c: In function 'swap_enable_disable': util-linux/swaponoff.c:100: warning: passing argument 1 of 'resolve_mount_spec' from incompatible pointer type make[1]: *** [util-linux/swaponoff.o] Error 1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * chpasswd: support -c argument and respect DEFAULT_PASSWD_ALGOPascal Bach2015-12-182-18/+23
| | | | | | | | | | Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * include/platform.h: Remove extra #endif introduced in 6df9612.Ari Sundholm2015-12-171-1/+0
| | | | | | | | | | | | | | It causes the compilation to fail. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Resolve linker issues with Android API 21 (dprintf, tcdrain)Chris Renshaw2015-12-172-1/+8
| | | | | | | | | | Signed-off-by: Chris Renshaw <osm0sis@outlook.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * blkid: add bcache supportMike Frysinger2015-12-163-0/+115
| | | | | | | | | | URL: https://bugs.gentoo.org/508596 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * swapon/swapoff: refine the -e (ifexists) optionMike Frysinger2015-12-161-8/+7
| | | | | | | | | | | | | | | | The -e option should only apply to swapon, and it should swallow all errors/warnings when the device does not exist. So delete the flag from the swapoff patch and unify the check in the swapoff path. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * trylink: include LDFLAGS when checking linkageMike Frysinger2015-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | The user might be including options in their LDFLAGS (like -fuse-ld=gold) that change the behavior of the linker and thus change the results of the flag tests. Make sure we include the user's LDFLAGS when running these tests so we filter out flags that will fail when used later on. URL: https://bugs.gentoo.org/499712 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | libbb: additional support for backslashes in pathsRon Yorston2015-11-132-1/+22
| |
* | Merge branch 'busybox' into mergeRon Yorston2015-11-0627-171/+366
|\|
| * modutils: fix build error with !DEPMODDenys Vlasenko2015-11-061-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modutils: merge module_entry and module_info to commonTimo Teräs2015-11-054-120/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merges the in-memory module info structures of modprobe and depmod. This allows sharing hashing by modulename code improving depmod runtime with almost factor of 2x. function old new delta get_or_add_modentry - 17 +17 do_modprobe 590 601 +11 moddb_get_or_create - 10 +10 load_modules_dep 195 205 +10 moddb_get - 7 +7 add_probe 81 78 -3 modprobe_main 721 714 -7 depmod_main 553 543 -10 config_file_action 434 421 -13 helper_get_module 160 144 -16 parse_module 343 320 -23 order_dep_list 105 82 -23 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/7 up/down: 55/-95) Total: -40 bytes Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * TODO file: remove mpstat, iostat, powertop - we have them nowDenys Vlasenko2015-11-041-2/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add support for bash 'function' keywordRon Yorston2015-11-043-31/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where the POSIX shell allows functions to be defined as: name () compound-command [ redirections ] bash adds the alternative syntax: function name [()] compound-command [ redirections ] Implement this in ash's bash compatibility mode. Most compound commands work (for/while/until/if/case/[[]]/{}); one exception is: function f (echo "no way!") The other two variants work: f() (echo "ok") function f() (echo "also ok") function old new delta parse_command 1555 1744 +189 tokname_array 232 240 +8 .rodata 155612 155566 -46 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 197/-46) Total: 151 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush-misc/func_args1.tests: remove "UNFIXED BUG", it does not failDenys Vlasenko2015-11-042-3/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: copy function tests from hush testsuiteRon Yorston2015-11-0416-0/+119
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2c_tools: suppress "'blen' may be used uninitialized in this function"Denys Vlasenko2015-11-011-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: display the numeric value for block read ioctl() errorsBartosz Golaszewski2015-11-011-2/+4
| | | | | | | | | | | | | | | | This makes busybox i2cdump compatible with the upstream version, which also displays the numeric error value in case of a block read failure. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: bail-out if block read failsBartosz Golaszewski2015-11-011-5/+8
| | | | | | | | | | | | | | | | | | We should bail-out if i2c_smbus_read_block_data() or i2c_smbus_read_i2c_block_data() return 0 or less. Add the missing check for the former and fix the existing for the latter. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: use I2C block mode for the 'i' mode parameterBartosz Golaszewski2015-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | Currently we're calling i2c_smbus_read_block_data() for both 'i' and 's' mode parameters. If the bus doesn't support SMBus block mode, then the i2c access ioctl() fails. Make i2cdump behave compatibly with upstream version by calling i2c_smbus_read_i2c_block_data() for I2C block. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: don't read block data in non-block modesBartosz Golaszewski2015-11-011-1/+2
| | | | | | | | | | | | | | | | We currently read data twice in byte mode. Add a check to avoid calling i2c_smbus_read_i2c_block_data() if we're not in I2C or SMBus block mode. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: coding style: add a space after 'for'Bartosz Golaszewski2015-11-011-1/+1
| | | | | | | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: fix address skipping in auto modeBartosz Golaszewski2015-11-011-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | If the bus doesn't support SMBus Quick Write or Receive Byte commands and we're running in auto mode all addresses will be skipped resulting in an empty table being printed. This is caused by not restoring the auto mode after it's been changed for certain address ranges - we need an additional variable to hold the temporary state. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifupdown: use -x hostname:NAME with udhcpcNatanael Copa2015-10-311-2/+2
| | | | | | | | | | | | | | | | The -H NAME is deprecated in udhcpc. See commit 2017d48c0d70bef8768efb42909e605ea8eb5a21 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | find: enable -perm option in default configurationRon Yorston2015-11-032-2/+2
| |
* | win32: improve implementation of statfsRon Yorston2015-11-013-14/+13
| | | | | | | | The WIN32 calls should be passed the root directory of the filesystem.
* | Update default configurationRon Yorston2015-11-013-19/+18
| |
* | Merge branch 'busybox' into mergeRon Yorston2015-10-31101-549/+1041
|\|
| * [g]unzip: fix recent breakage.Denys Vlasenko2015-10-302-12/+22
| | | | | | | | | | | | Also, do emit error message we so painstakingly pass from gzip internals Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: allow popredir to be called if the stack is emptyRon Yorston2015-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If /tmp/test.sh is a script that tries to run a second script which happens to be non-executable this: command . /tmp/test.sh causes a seg fault. This is because clearredir is called in the error path to clear the stack of redirections. The normal path then calls popredir, but popredir fails when the stack is empty. Reported-by: Bastian Bittorf <bittorf@bluebottle.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>