aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * logread: intercept all fatal signals, not just SIGINTDenys Vlasenko2013-07-281-5/+4
| | | | | | | | | | | | | | function old new delta interrupted 27 20 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nc: remove some dead codeDenys Vlasenko2013-07-281-24/+12
| | | | | | | | | | | | | | function old new delta readwrite 887 841 -46 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nc: exit when both stdin and network are closed.Denys Vlasenko2013-07-281-19/+31
| | | | | | | | | | | | | | | | function old new delta nc_main 1051 1042 -9 readwrite 943 887 -56 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nc: use symbolic SHUT_WR instead of literal 1Denys Vlasenko2013-07-281-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Update docs/tcp.txtDenys Vlasenko2013-07-271-1/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * buildsys: Add helper to list suid appletsBernhard Reutner-Fischer2013-07-264-6/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper script that lists all applets that - do or may require SUID provileges (busybox.cfg.suid) - do not require SUID provileges (busybox.cfg.nosuid) Some setups prefer to build two busybox binaries, one that is suid which contains all applets that do or may require suid privileges, and a second one for all the rest (which drops suid). To ease splitting these two binaries, generate a list of CONFIG_ items for the suid binary. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * Add notes about TCP programming quirks.Denys Vlasenko2013-07-251-0/+65
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * date: accept 'yyyy-mm-dd HH' and 'yyyy-mm-dd' date formatsBartosz Golaszewski2013-07-251-10/+23
| | | | | | | | | | | | | | | | function old new delta parse_datestr 794 885 +91 Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * networking: code shrinkBartosz Golaszewski2013-07-255-99/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta in_ether - 124 +124 hexchar2int 42 - -42 ifconfig_main 1237 1106 -131 ether_input 141 - -141 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 0/1 up/down: 124/-314) Total: -190 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk.tests: add test for recent large integer fixDenys Vlasenko2013-07-221-3/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: fix matching of newlines by $Denys Vlasenko2013-07-212-1/+22
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: survive lack of CDF on non-streaming zip filesDenys Vlasenko2013-07-211-16/+39
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: use "long long" as integer type, not "int"Denys Vlasenko2013-07-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Testcase: awk "BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}" 2147483647 2147483647 0 2147483648 2147483648 0 (last three values weren't showing right) function old new delta evaluate 3444 3458 +14 fmt_num 221 230 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: increase PEEK_FROM_END from 16k to 64kDenys Vlasenko2013-07-201-1/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip link: add VLAN supportPatrick McHardy2013-07-151-9/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta do_add_or_delete - 1073 +1073 get_u16 - 62 +62 static.protocols - 16 +16 do_iplink 1235 1232 -3 do_change 495 - -495 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/1 up/down: 1151/-498) Total: 653 bytes Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip: code shrinkDenys Vlasenko2013-07-153-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta do_ipaddr 78 81 +3 do_iprule 140 139 -1 do_iptunnel 283 278 -5 iprule_modify 851 841 -10 ipaddr_modify 1293 1236 -57 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/4 up/down: 3/-73) Total: -70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fix in commentDenys Vlasenko2013-07-141-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Commonalize typical [b,]k,m suffix structDenys Vlasenko2013-07-1311-58/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bkm_suffixes - 32 +32 static.km_suffixes 24 - -24 suffixes 32 - -32 static.bkm 32 - -32 head_tail_suffixes 32 - -32 ------------------------------------------------------------------------------ (add/remove: 2/6 grow/shrink: 0/0 up/down: 72/-160) Total: -88 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * chrt: remove warning for _POSIX_PRIORITY_SCHEDULINGBernhard Reutner-Fischer2013-07-081-3/+0
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * typo fix in commentDenys Vlasenko2013-07-081-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tail: code shrinkDenys Vlasenko2013-07-081-16/+15
| | | | | | | | | | | | | | | | | | | | function old new delta tail_main 1548 1613 +65 tail_read 136 34 -102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 65/-102) Total: -37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: remove now-redundant backslash-newline handlingDenys Vlasenko2013-07-081-16/+2
| | | | | | | | | | | | | | | | | | | | | | 4b0bb9e0fd9ec06e9e61b1a1527ace99ea9fe571 added this code in 2007, then in a2215b98f7d65bc613b9c8f008d79672402c6a07 more general fix was added. function old new delta add_cmd_block 98 58 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: document where we are more liberal then GNUDenys Vlasenko2013-07-081-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Call setlocale("") , not "C", if we want to set the default oneDenys Vlasenko2013-07-071-3/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unicode: check $LC_CTYPE too to detect Unicode modeDenys Vlasenko2013-07-054-2/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * foo*sum: Correct syntax errorCristian Ionescu-Idbohrn2013-07-041-1/+1
| | | | | | | | | | | | | | coreutils/md5_sha1_sum.c:156:3: error: expected '}' before 'else' Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * tail: track file size only in -f modeDenys Vlasenko2013-07-021-11/+15
| | | | | | | | | | | | This eliminates extra fstat and lseek calls on every read Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * foo*sum: report I/O errors, don't merely exit with 1.Denys Vlasenko2013-07-021-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unicode: check $LC_ALL to detect Unicode mode, not only $LANGDenys Vlasenko2013-07-023-6/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: do not abort if "_" is encountered in a HTTP headerDenys Vlasenko2013-07-011-2/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cryptpw: do not segfault on EOF. Closes 6350Denys Vlasenko2013-06-301-7/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: change execl sentinels from NULL to (char*)0Rich Felker2013-06-303-3/+3
| | | | | | | | | | Signed-off-by: Rich Felker <dalias@aerifal.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ubi_tools: enhance -s option to allow size multiplier to match mtd-utilsDenys Vlasenko2013-06-301-1/+8
| | | | | | | | | | | | | | | | | | | | Based on patch by Paul B. Henson <henson@acm.org> function old new delta static.size_suffixes - 32 +32 ubi_tools_main 1141 1148 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ubi_tools: add forgotten argv++Denys Vlasenko2013-06-301-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ubi_tools: extend supported volume size to 64 bits; shrink codeDenys Vlasenko2013-06-301-149/+154
| | | | | | | | | | | | | | | | | | | | | | function old new delta get_num_from_file - 90 +90 packed_usage 29395 29377 -18 ubi_tools_main 1349 1141 -208 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 90/-226) Total: -136 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ubimkvol: add -m option to create volume of maximum sizePaul B. Henson2013-06-301-6/+45
| | | | | | | | | | Signed-off-by: Paul B. Henson <henson@acm.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pstree: fix theoretically unsafe codeDenys Vlasenko2013-06-281-1/+1
| | | | | | | | | | | | In practice, p->comm is never long enough to trigger the bug, but still. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ping: code shrinkDenys Vlasenko2013-06-281-13/+14
| | | | | | | | | | | | | | function old new delta unpack_tail 262 243 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Move create_icmp[6]_socket to its only user, and simplify itDenys Vlasenko2013-06-285-99/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta run_applet_and_exit 711 714 +3 sendping_tail 239 236 -3 common_ping_main 1798 1770 -28 create_icmp_socket 65 - -65 create_icmp6_socket 65 - -65 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 1/2 up/down: 3/-161) Total: -158 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * losetup: assorted fixes. Closes 6314Denys Vlasenko2013-06-272-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | "losetup -d" was not complaining that LOOPDEV is missing. "losetup -a" was listing only up to /dev/loop9. "losetup -f" looped forever if llop0 was taken, and never tried anything after /dev/loop9. "-o" with other options (say, -r) had no effect. function old new delta losetup_main 376 419 +43 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lsof: correct check for symbolic linkThomas De Schampheleire2013-06-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Busybox lsof used the d_type field of a 'struct dirent' to verify whether the entry is a symbolic link. This field, however, is not portable. On at least one board [1] I have seen, that field is 0, and the check fails even though the entry is a link. The explicit check for a symbolic link is really only needed to skip the default directory entries '.' and '..'. The directory /proc/<pid>/fd/ should not contain anything else but these two and symbolic links. With these assumptions, this patch replaces the explicit link check with a basic check for '.' and '..' (and any hidden file). In the unlikely case that there are other file types, xmalloc_readlink() will return NULL, and we can skip the entry. [1] A MIPS-based board with glibc 2.9, Linux 2.6.32.27. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nslookup: set default DNS server again. Hopefully helps with 675Denys Vlasenko2013-06-271-2/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * md5/sha512: a better fix for strict aliasing warningsDenys Vlasenko2013-06-272-3/+4
| | | | | | | | | | | | | | The locations *are* well-aligned for direct stores on any architecture. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * md5/sha512: fix strict aliasing warningsMike Frysinger2013-06-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the target can tolerate these issues, then gcc is smart enough to generate the same code (x86_64 produces the same code). If the target can't, then it needs the memcpy anyways. libbb/hash_md5_sha.c: In function 'common64_end': libbb/hash_md5_sha.c:87:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[64 - 8]) = t; libbb/hash_md5_sha.c: In function 'sha512_end': libbb/hash_md5_sha.c:886:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[128 - 8]) = t; libbb/hash_md5_sha.c:889:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[128 - 16]) = t; Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * pstree: stop truncating thread namesMike Frysinger2013-06-191-3/+10
| | | | | | | | | | | | | | | | | | This also fixes a minor buffer overflow when displaying threads as add_proc() only expects COMM_LEN bytes, but we give it one more than that. Reported-by: Dag Wieers <dag@wieers.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * ntpd: set offset to 0.0 in "usync" eventDenys Vlasenko2013-05-231-3/+8
| | | | | | | | | | | | | | function old new delta ntpd_main 1030 1026 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: set G.last_script_run even if script isn't configuredDenys Vlasenko2013-05-221-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: make "unsync" code actually work.Denys Vlasenko2013-05-221-3/+13
| | | | | | | | | | | | While at it: don't run "periodic" if interrupted by a signal. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: drop delay outliers; run "unsync" handler if no replies for some timeDenys Vlasenko2013-05-221-8/+34
| | | | | | | | | | | | | | | | | | | | function old new delta ntpd_main 960 1029 +69 recv_and_process_peer_pkt 834 892 +58 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 127/0) Total: 127 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sulogin: allow system maintenance login if root password is emptyJonathan Liu2013-05-212-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current password checking is unable to distinguish between the user entering an empty password or pressing Control-D. As a result, an empty password always results in normal startup. We modify bb_ask to return NULL if Control-D is pressed without entering a password. The sulogin applet is then modified to only proceed to normal startup if bb_ask returns NULL. This covers EOF with no password, interrupt by timeout and ^C. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>