aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * more bionic fixesDenys Vlasenko2016-03-142-1/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fixes for problems found by bionic buildDenys Vlasenko2016-03-142-18/+28
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: fix a warning in debug codeDenys Vlasenko2016-03-111-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: fix a SEGV on malformed RFC1035-encoded domain nameDenys Vlasenko2016-03-101-4/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * renice: tweak help textDenys Vlasenko2016-03-071-6/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: fix columnar output. Closes 8731Denys Vlasenko2016-03-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In coreutils/ls.c, 1.19 introduced commit 2f7d9e8903029b1b5e51a15f9cb0dcb6ca17c3ac, removing the variable tabstops and hard coding the column separation to 2 characters, but was not done correctly. The column_width assumes a gap of 1 character, so the computed number of columns exceeds the terminal width when many small files are encountered. A minor problem but surprisingly annoying. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * inotifyd: swap meaning of 'y' and 'm' events in help text. Closes 8726Denys Vlasenko2016-03-061-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: do not use -t NUM for counting "select" packets, use 3Denys Vlasenko2016-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Otherwise, "-t 0" usage may end up sending them forever if server does not respond. function old new delta udhcpc_main 2846 2836 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: add experimental patchDenys Vlasenko2016-03-041-0/+24
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: if peer does not reply anymore, try re-resolving its hostnameDenys Vlasenko2016-03-041-0/+19
| | | | | | | | | | | | | | | | function old new delta ntpd_main 1053 1130 +77 add_peers 166 195 +29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: do not use a peer more than once (say, if two peers resolve to the ↵Denys Vlasenko2016-03-041-1/+16
| | | | | | | | | | | | | | | | | | same IP) function old new delta add_peers 98 166 +68 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: more informative poll lowering messageDenys Vlasenko2016-03-031-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifupdowm: fix "warning: unused variable 'iface_list'"Denys Vlasenko2016-03-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcpc: Use client IP address as source address for DHCP renew/rebind messagesHans Dedecker2016-03-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | RFC2131 paragraph 4.1 states DHCP messages broadcast by a client prior to that client obtaining its IP address must have the source IP address field in the header set to 0. Request messages transmitted in renewing and rebinding state need to use the obtained IP address as source IP address in the header; this behavior lines up with other implementations like ISC dhcp client. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpd: keep expired leases at startupChristian Lindeberg2016-03-012-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let udhcpd retain the information about expired leases when restarting so that the leases are reserved until they possibly become the oldest expired lease. This reduces the frequency of IP address changes for example when the DHCP server and a group of clients, who do not store and request their previously offered IP address across restarts, are collectively restarted and the startup order of the clients are not guaranteed. Signed-off-by: Christian Lindeberg <christian.lindeberg@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifupdown: allow duplicate interface definitionsNicolas Cavallari2016-03-011-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allow to have multiple interface definitions, much like Debian's ifupdown. More specifically, it removes the check for a duplicate definition, so the impact on binary size should be fairly minimal. This configuration: iface eth0 inet static address 192.168.0.15 netmask 255.255.0.0 gateway 192.168.0.1 iface eth0 inet static address 10.0.0.1 netmask 255.255.255.0 Will add two addresses to eth0 if ip is used. If ifconfig is used, the standards methods will likely not stack, but the administrator may still use the manual method. The DHCP method may work depending on the DHCP client in use. This is a fairly advanced feature for power users who knows what they are doing. There are not many other network configuration systems that allows multiple addresses on an interface. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: fix OPTION_6RD parsing (could overflow its malloced buffer)Denys Vlasenko2016-02-262-4/+15
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: trivial shrinkDenys Vlasenko2016-02-261-4/+3
| | | | | | | | | | | | | | function old new delta dname_dec 337 332 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * taskset: fix non-fancy cpuset printing on big-endianArnout Vandecappelle (Essensium/Mind)2016-02-261-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-fancy version of the from_cpuset uses CPU_SETSIZE as if it represents the number of bytes in the cpuset, while it is actually the number of bits. This leads to out-of-bounds accesses on the cpu_set_t in the big-endian case. Basically all uses of CPU_SETSIZE have to be divided by 8. This is done correctly in the fancy version of from_cpuset. In addition, the big-endian case is completely wrong to begin with. All standard C libraries that I know of implement cpu_set_t as an unsigned long array, so both for big and little endian, the least significant bits are in the beginning of the array. Therefore, the approach taken for the little endian case is equally valid. We only need special handling for big endian when CPU_SETSIZE is large and we use an unsigned long long to get more bits out. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: print packet delay in clock update messageDenys Vlasenko2016-02-241-2/+8
| | | | | | | | | | | | | | function old new delta update_local_clock 820 826 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | mingw: remove bbconfig from default configurationRon Yorston2016-03-272-4/+4
| | | | | | | | bbconfig isn't very useful. Removing it saves over 5KB.
* | sed: drop \r when reading inputRon Yorston2016-03-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An upstream bug (https://bugs.busybox.net/show_bug.cgi?id=8791) reports: $ cat myfile a b c $ sed "s/\(.*\)/\1\1/" myfile a b c it should be: $ sed "s/\(.*\)/\1\1/" myfile aa bb cc This happened because busybox-w32 opens files in binary mode. Lines read by sed had trailing LFs removed but not trailing CRs. The CRs ended up in the matched strings and were output, thus giving the appearance that only one of the backreferences was printed. The same happens on Linux when a DOS file is processed by BusyBox sed or GNU sed. However, this behaviour is arguably incorrect on Windows. I've modified busybox-w32 to drop trailing CRs as well as LFs from input lines.
* | win32: fix quoting of arguments with trailing backslashesRon Yorston2016-03-161-15/+48
| | | | | | | | | | | | | | | | Correctly handle the case where an argument needs to be quoted and has a backslash as its last character. The issue was detected by the test "sed a cmd ended by double backslash" in the BusyBox test suite.
* | Silence a couple of compiler warningsRon Yorston2016-03-063-3/+4
| |
* | mingw: add -fno-ident to CFLAGSRon Yorston2016-02-221-2/+1
| | | | | | | | | | | | | | | | Without this flag a compiler version string is injected into each binary object. The linker doesn't deduplicate the strings, leading to bloat. This enhancement was suggested by Viktor Szakats. It saves 13KB.
* | mingw: update default configurationRon Yorston2016-02-222-2/+10
| |
* | mingw: silently ignore O_NONBLOCK on file openRon Yorston2016-02-221-2/+1
| |
* | Merge branch 'busybox' into mergeRon Yorston2016-02-2233-140/+530
|\|
| * modprobe: only parse files that end in .confMike Frysinger2016-02-121-1/+9
| | | | | | | | | | | | | | | | | | This matches behavior with kmod which has been the standard for a long time at this point. URL: https://bugs.busybox.net/8021 Reported-by: Jö <jorrit@jorrit.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * 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>