Denys Vlasenko
a76dd50ce1
Move Adroid endgrent() and endpwent() NOPS to libbb.h
...
They should be after includes of pwd.h and grp.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-08 16:11:38 +01:00
Denys Vlasenko
acdb0041b3
libpwdgrp/pwd_grp.c: use same static buffer for all getpwXX functions
...
This should save more than 0.5k of malloced memory in applets
which use those functions.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-06 16:24:56 +01:00
Denys Vlasenko
2e55404bcf
libpwdgrp/pwd_grp.c: set opened /etc/{passwd,group,shadow} fds CLOEXEC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-06 16:23:42 +01:00
Denys Vlasenko
6b64a26976
platform.h: define endgrent() and endpwent() as no-ops on Android
...
Surprisingly, bionic libc seems to lack these functions.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-06 16:23:18 +01:00
Denys Vlasenko
ba65872950
libbb/bb_strtonum: always set end ptr, even on error return
...
function old new delta
handle_errors 69 61 -8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-22 13:00:32 +01:00
Alexey Fomenko
6a93212b54
kill: fix segfault in arguments parsing
...
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-22 11:38:57 +01:00
Denys Vlasenko
83f103b30e
ash: in standalone mode, search in $PATH if /proc/self/exe doesn't exist
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-20 06:10:35 +01:00
Denys Vlasenko
3365e9f3cc
makemime: tweak help text: -a HDR can be repeated
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-20 02:15:19 +01:00
Denys Vlasenko
03419aa037
httpd: don't drop/abuse QUERY_STRING when /cgi-bin/index.cgi is used
...
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-19 12:30:34 +01:00
Denys Vlasenko
93b4a60526
wget: fix use-after-free on redirect
...
function old new delta
wget_main 2153 2168 +15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-18 05:11:56 +01:00
Denys Vlasenko
f282c6b657
libbb: remove is_directory's argument which is always NULL
...
function old new delta
send_cgi_and_exit 892 890 -2
ln_main 447 445 -2
handle_incoming_and_exit 2784 2780 -4
is_directory 66 59 -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19) Total: -15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-18 03:27:46 +01:00
Denys Vlasenko
f85bd1a7a7
httpd: remove redundant NULL assignment and save one strrchr. -8 bytes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-18 03:22:36 +01:00
Michael McTernan
ee0f444f11
udhcp: finish support of classless static routes (now the correct patch!)
...
Signed-off-by: Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-16 17:10:09 +01:00
Michael McTernan
7b57ff4436
udhcp: finish support of classless static routes
...
function old new delta
udhcp_str2optset 415 532 +117
Signed-off-by: Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-16 17:05:52 +01:00
Paulius Zaleckas
be2a557918
vconfig: remove /proc/net/vlan/config check
...
In original implementation /proc/net/vlan/config check only prints warning
and does not exit. Busybox version exits if this file is not found and this
prevents kernel module autoloading to work.
I think it is safe to remove this check since ioctl() call will fail
(with proper
error code) anyway if 802.1q module is not loaded (or autoloading is off).
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-16 01:42:55 +01:00
Denys Vlasenko
b05cd6b7a7
httpd: fix /../ sanitization (had one extra semicolon). rewrote it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-16 01:37:02 +01:00
Denys Vlasenko
cda6ea905d
ash: document bash's exit code too. No code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-16 00:44:36 +01:00
Denys Vlasenko
2bef526331
ash: add comment about bash's ENOEXEC handling. No code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-16 00:25:17 +01:00
Denys Vlasenko
d6f5000c13
*: style fixes. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-15 12:39:25 +01:00
Lauri Hintsala
454fe29a80
ifupdown: remove interface from state_list if iface_up fails
...
Fix the issue where interface is set to the configured state even if
configuration has failed. Add error check to state setting logic.
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-15 12:33:39 +01:00
Daniel Fandrich
1b41b33be3
configs/android_defconfig: update
...
Signed-off-by: Daniel Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-15 10:14:51 +01:00
walter harms
fdf514f343
touch: add new option FEATURE_TOUCH_SUSV3
...
This options -d -t -r where hidden under DESKTOP.
This option allows the user to enable these options for (only) touch.
The patch only changes DESKTOP to FEATURE_TOUCH_SUSV3.
Signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-14 08:48:59 +01:00
Denys Vlasenko
3ef3cc5949
touch: document -t DT option in help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-13 16:56:47 +01:00
Denys Vlasenko
7280d2017d
udhcpc: sanitize hostnames in incoming packets. Closes 3979.
...
The following options are replaced with string "bad" if they
contain malformed hostname:
HOST_NAME, DOMAIN_NAME, NIS_DOMAIN, TFTP_SERVER_NAME
function old new delta
xmalloc_optname_optval 850 888 +38
attach_option 440 443 +3
len_of_option_as_string 13 14 +1
dhcp_option_lengths 13 14 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 43/0) Total: 43 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-08 16:41:05 +01:00
Denys Vlasenko
53782d9221
iproute: fix help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-06 18:59:55 +01:00
Denys Vlasenko
2f8ccc14f7
blkid: make help text show [BLOCKDEV]...
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-06 15:09:27 +01:00
Denys Vlasenko
c3375f0389
volume_id/get_devname: trivial code shrink
...
function old new delta
uuidcache_init 36 41 +5
get_devname_from_uuid 55 51 -4
get_devname_from_label 61 57 -4
display_uuid_cache 109 105 -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 5/-12) Total: -7 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-06 15:06:59 +01:00
Denys Vlasenko
b8ff9357d5
suppress a "integer overflow in expression" waring on big endian. Closes 4405
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-05 04:54:14 +01:00
Tristan Schmelcher
5560e1af0a
Fix link failure on some platforms when PAM is enabled
...
Signed-off-by: Tristan Schmelcher <tristan_schmelcher@alumni.uwaterloo.ca>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-05 04:38:58 +01:00
Denys Vlasenko
ef7aa46bc4
init: code shrink -4 bytes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-05 03:54:28 +01:00
Denys Vlasenko
beb860ac75
init: utmp update of DEAD_PROCESS was misplaced, and could be skipped. Fixing.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-05 03:31:05 +01:00
Pascal Bellard
0fa3e5f6f9
httpd: small fixes to previous change
...
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-29 20:54:30 +01:00
Pascal Bellard
7291755439
httpd: make it possible to use system passwords for auth
...
function old new delta
check_user_passwd 320 467 +147
httpd_main 760 757 -3
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-29 13:51:11 +01:00
Denys Vlasenko
901365fcff
old_e2fsprogs/blkid: close the fd after we are done with it
...
Some people have HUGE /dev/*...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-28 18:57:04 +01:00
Denys Vlasenko
1fd7129bc6
vi: fix [end] key handling
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-28 04:55:48 +01:00
Daniel Fandrich
65a1ee956f
rx: fix file corruption on block checksum failure
...
Rather than dropping the bad block, rx was appending it
to the file.
Signed-off-by: Daniel Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-23 12:07:31 +01:00
Denys Vlasenko
d2277e262f
nommu: fix cases where we mangle argv[0][0]
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-22 17:19:26 +01:00
Daniel Fandrich
fcb9e07eca
Added a few more features to android_defconfig
...
Signed-off-by: Daniel Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-21 14:27:35 +01:00
Denys Vlasenko
5f118ff885
Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox
2011-11-21 14:25:15 +01:00
Denys Vlasenko
fc186711fe
makemime: document our current behavior. Tweak help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-19 14:43:02 +01:00
Denys Vlasenko
3bc4fc5857
makemime: content-type should default to application/octet-stream
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-19 13:55:46 +01:00
Denys Vlasenko
578b817151
sendmail: fix a mistake in previous commit
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-19 13:54:50 +01:00
Denys Vlasenko
41fea01066
sendmail: stop doing -t unconditionally; makemime: generate 76 char base64 lines
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-18 22:25:35 +01:00
Denys Vlasenko
a0bef7cc27
hexdump: fix hexdump -n1 -ve '8/2 ""' SEGV. Closes 4478
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-18 02:47:35 +01:00
Denys Vlasenko
860491c525
udhcpc: shrink code by setting xid more economically
...
function old new delta
send_decline 90 82 -8
udhcpc_main 2649 2640 -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-18 02:09:13 +01:00
Denys Vlasenko
1dc80bae0b
libbb.h: add check for bad off_t size detection
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-17 21:51:32 +01:00
Denys Vlasenko
f59a50ee30
libbb.h: tighten up macro code
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-16 21:30:19 +01:00
Denys Vlasenko
a092a89d8f
udhcpc6: rudimentary code to export data to script; fix IAADDR parsing
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-16 20:17:12 +01:00
Denys Vlasenko
2951add2bf
applets_sh/nologin: an applet implemented as shell script
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-10 18:00:28 +01:00
Denys Vlasenko
39b233182c
mount: resolve hosts to IPs in nfs mounts
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-10 17:01:39 +01:00