Denys Vlasenko
109ee5d336
ash: make "locak VAR" unset VAR (bash does that)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16 18:41:11 +01:00
Denys Vlasenko
438b4ac286
script: make it work even if fd 0 is closed
...
Testcase:
script -q -c "echo hey" /dev/null 0>&-
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16 12:34:53 +01:00
Denys Vlasenko
29f3526048
build system: for "find", use POSIX not operator (!) instead of -not
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16 12:05:58 +01:00
Romain Naour
0e3334c8d8
su: add a delay if the password is incorrect
...
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16 11:18:19 +01:00
Denys Vlasenko
ac03a40cba
ash,hush: fix a thinko about 2^64-1 factorization
...
function old new delta
next_random 113 119 +6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-15 09:25:46 +01:00
Denys Vlasenko
2bba591991
hush: make "true" built-in
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-14 12:43:57 +01:00
Denys Vlasenko
f93187512d
random: cosmetic tweaks in debug code
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-13 13:03:27 +01:00
Denys Vlasenko
fb183076a3
ash,hush: improve randomness of $RANDOM, add easy-ish way to test it
...
function old new delta
next_random 68 113 +45
change_random 103 121 +18
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-13 12:52:43 +01:00
Denys Vlasenko
69f9567de2
shuf: trim help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-07 14:41:53 +01:00
Denys Vlasenko
102f0d0d07
shuf: do not use strings for -i RANGE case
...
function old new delta
shuf_main 482 496 +14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-07 14:32:39 +01:00
Bartosz Golaszewski
190693ced1
shuf: improve help text
...
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-07 14:07:35 +01:00
Bartosz Golaszewski
58adbb5505
shuf: fix a segfault on 'shuf -e'
...
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-07 11:46:03 +01:00
Denys Vlasenko
0ed5f7aacd
use [s]rand(), not [s]random()
...
rand() is the most standard C library function,
and on uclibc they are the same. I guess
they are the same in most todays' libc...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-05 18:58:15 +01:00
Denys Vlasenko
2cdcb1082c
shuf: new applet
...
function old new delta
shuf_main - 478 +478
packed_usage 29571 29719 +148
applet_names 2460 2465 +5
applet_main 1428 1432 +4
applet_nameofs 714 716 +2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 4/0 up/down: 637/0) Total: 637 bytes
Based on the code by Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-05 18:56:20 +01:00
Denys Vlasenko
30f17e9556
man: default to ascii
...
Default to ascii instead of latin1. Otherwise man pages can be displayed
incorrectly. E.g. bullets show as "<B7>".
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-03 15:14:26 +01:00
Denys Vlasenko
ecd8c3affc
ip link: add support for "address ETHADDR". Closes 4862
...
function old new delta
do_iplink 2175 2289 +114
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-01 17:38:41 +01:00
Denys Vlasenko
81071e6872
unlzma: add comments about possible bug from BZ 2689
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-28 15:42:10 +01:00
Denys Vlasenko
2108a6f0b5
unlzma: move some variables in "more local" scope
...
No code changes as verified by objdump
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-28 15:05:43 +01:00
Denys Vlasenko
e2318bbad7
udhcpc: ignore NAKs from "wrong" servers. Closes 4267
...
function old new delta
udhcpc_main 2716 2814 +98
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27 18:15:50 +01:00
Denys Vlasenko
fca0ee5959
ls: make "ls -s DIR" show total too. Clases 4946
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27 15:40:26 +01:00
Denys Vlasenko
3795266841
xargs: fix compilation breakage
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27 15:02:36 +01:00
Denys Vlasenko
83e49ade57
grep: fix -w match if first match isn't a word, but second is. Closes 4520
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27 14:56:12 +01:00
Denys Vlasenko
6f068904dc
xargs: add support for -I and -i. Closes 493
...
function old new delta
process_stdin_with_replace - 195 +195
xmalloc_substitute_string - 145 +145
xargs_main 808 884 +76
count_strstr - 45 +45
packed_usage 29580 29571 -9
parse_params 1445 1416 -29
func_exec 285 138 -147
------------------------------------------------------------------------------
(add/remove: 4/0 grow/shrink: 1/3 up/down: 461/-185) Total: 276 bytes
text data bss dec hex filename
922156 932 17692 940780 e5aec busybox_old
922440 932 17692 941064 e5c08 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27 11:17:06 +01:00
Denys Vlasenko
6885e49ba5
find: code shrink
...
function old new delta
func_exec 306 285 -21
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-26 15:27:10 +01:00
Denys Vlasenko
c472898eaa
nc: fix option bit positions. Closes 6926
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-26 13:58:59 +01:00
Denys Vlasenko
589051b565
hwclock: fix setting of tz_minuteswest. Closes 5414
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-25 17:52:10 +01:00
Denys Vlasenko
18b699c30f
build system: remove a dead link from Config help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-25 17:31:22 +01:00
Denys Vlasenko
83bc4332e7
du, copy_file: fix file matching on cramfs. Closes 5456
...
function old new delta
is_in_ino_dev_hashtable 88 108 +20
add_to_ino_dev_hashtable 150 142 -8
reset_ino_dev_hashtable 84 75 -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 20/-17) Total: 3 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-25 15:27:58 +01:00
Denys Vlasenko
12916b9220
libbb: trivial code shrink
...
function old new delta
reset_ino_dev_hashtable 84 74 -10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-25 15:09:01 +01:00
Denys Vlasenko
6554d03735
sysctl: do not error out showing write-only data. Closes 6386
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-24 17:28:43 +01:00
Denys Vlasenko
a2796223cb
wget: fix comment
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-24 17:20:40 +01:00
Denys Vlasenko
53315570bb
wget: add commented-out code to use ssl_helper instead of openssl
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-23 23:39:47 +01:00
Denys Vlasenko
d82046f59f
networking/ssl_helper: experimental matrixssl-based ssl helper
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-23 23:31:13 +01:00
Denys Vlasenko
8b7e8ae224
wget: add support for https using "openssl s_client" as a helper
...
www.kernel.org started redirecting http:// to https://
making https support mandatory for any auto build scripts.
function old new delta
wget_main 2631 2971 +340
parse_url 409 471 +62
.rodata 115607 115626 +19
P_HTTPS - 6 +6
P_HTTP - 5 +5
P_FTP - 4 +4
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 3/0 up/down: 436/0) Total: 436 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-22 14:12:29 +01:00
Denys Vlasenko
192c14bd87
Improve examples/var_service READMEs
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-21 12:55:43 +01:00
Bartosz Golaszewski
265a74b983
Kbuild: move CONFIG_PAM to general configuration
...
Currently CONFIG_PAM depends on CONFIG_LOGIN, but is used by the httpd applet too.
This patch moves said option to general configuration, thus allowing to
compile httpd with PAM support independently from login.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-19 18:53:25 +01:00
Denys Vlasenko
ffc3a93d0d
udhcpc: fix BPF filter. Hopefully fixes the root cause of 4598 and 6746
...
Use a *signed* large positive value in BPF filter to indicate success.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-19 14:17:11 +01:00
Denys Vlasenko
50e4cc29f5
ifplugd: code shrink
...
function old new delta
ifplugd_main 1161 1144 -17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-10 09:51:03 +01:00
Denys Vlasenko
3e78f6f955
htpd: trivial simplification in random interval selection
...
function old new delta
poll_interval 57 52 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-09 15:35:04 +01:00
Denys Vlasenko
8ed9672660
libbb: don't die if crypt() returns NULL
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-09 14:38:03 +01:00
Kaarle Ritvanen
4e03d41342
sendmail: use FQDN in default envelope sender
...
RFC 5321 requires the return path to be supplied with a proper domain
name.
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-09 09:49:36 +01:00
Denys Vlasenko
744ee5db1c
udhcpc: in comments, explain the kind of raw socket we create
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-07 17:38:52 +01:00
Bartosz Golaszewski
3ba2df874c
grep: properly handle grep -w "^str" in !EXTRA_COMPAT case too
...
function old new delta
grep_file 1267 1288 +21
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-07 17:15:56 +01:00
Denys Vlasenko
07f417b6ab
sendmail: make -f optional, document its default value
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-05 15:01:39 +01:00
Denys Vlasenko
e4785ca653
udhcpc: don't use BPF filter, users report problems (bugs 4598, 6746)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-03 18:03:42 +01:00
Kaarle Ritvanen
fe8390e0fe
ifupdown: support 'link' address family
...
Does not configure anything. L2 configuration hook scripts should do
their job on receiving ADDRFAM=link. Configuration will be done only
once, irrespective of L3 protocols used.
Using the 'link' family in the interfaces file conforms to the Debian
implementation:
http://sources.debian.net/src/ifupdown/0.7.47.1/link.defn
function old new delta
link_methods - 12 +12
addr_link - 12 +12
link_up_down - 6 +6
static.addr_fams 12 16 +4
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 1/0 up/down: 34/0) Total: 34 bytes
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-03 15:56:20 +01:00
Denys Vlasenko
d353bfff46
wget: fix use-after-free of ->user. Closes 6836
...
function old new delta
wget_main 2207 2223 +16
parse_url 339 353 +14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-03 14:09:42 +01:00
Denys Vlasenko
69a12fa790
catv: suppress compiler warning
...
The warning was:
warning: typedef 'BUG_const_mismatch' locally defined but not used [-Wunused-local-typedefs]
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-03 03:27:53 +01:00
Denys Vlasenko
640ce3de07
zcat: complain if input is not compressed
...
function old new delta
buffer_fill_and_print 178 191 +13
varvalue 735 743 +8
bbunpack 747 755 +8
open_zipped 85 89 +4
xmalloc_open_zipped_read_close 61 63 +2
get_addr_1 240 242 +2
fbsplash_main 1228 1230 +2
pstree_main 322 321 -1
builtin_type 121 119 -2
do_load 954 926 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/3 up/down: 39/-31) Total: 8 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-02 02:06:38 +01:00
Mike Frysinger
f1999b5a9d
appletlib: fix set-but-unused warning
...
When you build with FEATURE_INSTALLER disabled, you get a build
warning like so:
libbb/appletlib.c: In function 'busybox_main':
libbb/appletlib.c:691:7: warning: variable 'use_symbolic_links' set but
not used [-Wunused-but-set-variable]
int use_symbolic_links;
^
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-01-31 00:29:47 -05:00