Commit Graph

12687 Commits

Author SHA1 Message Date
Denys Vlasenko
ef43beac63 httpd: fix sendfile of files larger than 2 Gb. Closes 4754
When built with "sendfile" support, httpd was unable to send large files
(>2 GB) in one single connection, terminating it before the full file
has been sent.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-04 21:37:17 +01:00
Denys Vlasenko
9ec3cd400a tweak comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-02 11:29:43 +01:00
Denys Vlasenko
35def51c97 httpd: fix MD5-encrypted-in-httpd.conf password logic
function                                             old     new   delta
check_user_passwd                                    467     492     +25

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-01 02:42:54 +01:00
Felipe Contreras
428bd2d433 modprobe: accept -b even if blacklist functionality is disabled
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-31 14:55:15 +01:00
Dennis Groenen
c0657e0d0a vi: add ":prev" command support
function                                             old     new   delta
colon                                               2844    2891     +47
vi_main                                              243     255     +12
text_yank                                             54      56      +2
refresh                                              780     774      -6

Signed-off-by: Dennis Groenen <tj.groenen@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-31 14:12:38 +01:00
Denys Vlasenko
800a9a056a vi: move mark[i] pointers if text[] moves after realloc
While at it, optimized :s/find/repl/ a bit

function                                             old     new   delta
text_hole_make                                       120     150     +30
colon                                               2848    2844      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-31 14:10:26 +01:00
Sergey Naumov
7eaa03709b login: -f should not ask for password even with PAM
Signed-off-by: Sergey Naumov <sknaumov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-30 12:52:56 +01:00
Denys Vlasenko
da2b2da6a7 init: add a segv debugging aid, disabled by default
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-30 12:15:22 +01:00
Paulius Zaleckas
1c7724bf2a gen_build_files.sh: exclude hidden directories
I am using quilt to manage patches internally. Quilt creates dir .pc
and stores unmodified files there. Since I made change in one of
Config.src quilt made a copy in .pc/xxx.patch/xxx/Config.src. When
I run make it calls gen_build_files.sh and it generates
.pc/xxx.patch/xxx/Config.in. Now when I want to pop patch quilt
thinks I have made changes to original xxx/Config.in.

IMO the best solution is just to ignore hidden directories in
gen_build_files.sh. This also results in shorter build time in case
busybox is under git/svn versioning, since it avoids searching
many directories for Config.src.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-30 02:34:56 +01:00
Javier Viguera
e8758eaf4f mdev: fix wrong sizeof
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-30 02:15:13 +01:00
Quentin Casasnovas
c158601d50 bootchartd: add process accounting feature
function                                             old     new   delta
bootchartd_main                                      962    1088    +126
finalize                                             294     357     +63
acct                                                   -      33     +33
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 222/0)             Total: 222 bytes

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@mathembedded.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-18 02:12:13 +01:00
Javier Viguera
ce4f39ac7c find_mount_point: fix find_mount_point for char devices
This allows to find mount points of 'char' devices such as UBI volumes
which otherwise fail for example with 'df' command:

/ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root             72091984  12360980  56068924  18% /
devtmpfs                115236         4    115232   0% /dev
tmpfs                    28672        32     28640   0% /tmp
/dev/ubi0_0             360268     18348    341920   5% /tmp/mnt/userfs

/ # df /dev/ubi0_0
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs                115236         4    115232   0% /dev

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-18 01:49:11 +01:00
Denys Vlasenko
fdd0b3b398 vconfig: fix help text; small code shrink. Closes 4658
function                                             old     new   delta
xfind_str                                             45      46      +1
vconfig_main                                         228     223      -5
packed_usage                                       28980   28954     -26

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-16 04:00:37 +01:00
Denys Vlasenko
6e8861b5f1 *: better comments on termios manipulations. No code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-15 23:00:13 +01:00
Denys Vlasenko
7ce209b9d4 shell_builtin_read: set cc[VMIN] to 1; lineedit: don't clear c_cc[VINTR]
First change fixes "read -n NUM". Apparently poll() won't report
data availability if cc[VMIN] > 1 until there are at least cc[VMIN] bytes.

function                                             old     new   delta
read_line_input                                     3885    3877      -8
shell_builtin_read                                  1097    1087     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18)             Total: -18 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-15 22:58:06 +01:00
Denys Vlasenko
d29ae7e071 sed: fix possible case of signed char bug; expand debugging printouts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-15 20:06:03 +01:00
Denys Vlasenko
7550201e9a mke2fs: do not zero out first kilobyte. Closes 3247
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-11 01:02:31 +01:00
Denys Vlasenko
499597d6ef mdev: do not treat non-leading '#' chars as start of comment. Closes 4676
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-11 00:37:17 +01:00
Denys Vlasenko
982fdaf4b2 acpid: close fds which are reported as dead (POLLERR/POLLHUP/POLLNVAL) by poll.
function                                             old     new   delta
acpid_main                                          1159    1229     +70
packed_usage                                       28977   28980      +3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-09 05:01:25 +01:00
Denys Vlasenko
d45efd3a9f passwd,cryptpw: make default encryption algorithm configurable
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-08 16:44:37 +01:00
Denys Vlasenko
3e0c428c45 Move include <shadow.h> close to pwd.h and grp.h includes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-08 16:13:55 +01:00
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