Commit Graph

289 Commits

Author SHA1 Message Date
Pascal Bellard
70fc8c17e2 su: do not change to home dir unless -l
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-12 13:21:02 +02:00
Denys Vlasenko
8cab66730a fix build breakage found by randconfig
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-20 14:48:00 +02:00
Rob Walker
7a4269329f httpd: emit correct content length on range requests past the end. Closes 4952
Signed-off-by: Rob Walker <rwalker@codeaurora.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-03 08:09:28 +02:00
Denys Vlasenko
8cce1b3ad8 httpd: make byte ranges which start at 0 work too. Closes 4766
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-19 17:18:45 +01:00
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
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
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
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
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
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
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
Denys Vlasenko
dd1061b6a7 wget: URL-decode user:password before base64-encoding it into auth hdr. Closes 3625.
function                                             old     new   delta
percent_decode_in_place                                -     152    +152
parse_url                                            304     317     +13
handle_incoming_and_exit                            2795    2798      +3
httpd_main                                           763     760      -3
decodeString                                         152       -    -152
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 168/-155)           Total: 13 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-11 21:04:02 +02:00
Denys Vlasenko
66426760be *: remove "Options:" string from help texts
function                                             old     new   delta
packed_usage                                       28706   28623     -83

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Denys Vlasenko
12a432715f adduser: safe username passing to passwd/addgroup
passwd: support creating SHA passwords
random code shrink

function                                             old     new   delta
crypt_make_pw_salt                                     -      87     +87
adduser_main                                         883     904     +21
...
crypt_make_salt                                       99      89     -10
chpasswd_main                                        329     312     -17
packed_usage                                       28731   28691     -40
passwd_main                                         1070    1000     -70
cryptpw_main                                         310     224     -86
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/12 up/down: 154/-288)        Total: -134 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 03:19:01 +02:00
Pere Orga
5bc8c005a8 move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
d277f55ebd http: document index.cgi usage. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-10 03:08:22 +02:00
Peter Korsgaard
95755181b8 httpd: don't send error messages with gzip encoding
If CONFIG_FEATURE_HTTPD_GZIP is enabled and request contained
'Accept-Encoding: gzip', then errors were sent with 'Content-Encoding: gzip'
even though they aren't.

Fix it by clearing content_gzip before sending the headers.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27 23:26:33 +02:00
Denys Vlasenko
8030a14849 httpd: send correct mtime for .gz files
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-11 17:59:45 +01:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Peter Korsgaard
e5dbd56d77 httpd: simplified "gzip" test
function                                             old     new   delta
handle_incoming_and_exit                            2830    2807     -23

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 02:08:35 +02:00
Peter Korsgaard
7a2ba329b9 httpd: optional support for gzip-compressed pages
function                                             old     new   delta
send_file_and_exit                                   662     761     +99
handle_incoming_and_exit                            2756    2830     +74
send_headers                                         603     654     +51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 224/0)             Total: 224 bytes

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-25 03:20:53 +02:00
Denys Vlasenko
535ce1df5c httpd: cosmetic fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-25 03:20:25 +02:00
Denys Vlasenko
31c3dad851 remove recently added erroneous _and_die()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-27 16:57:55 +02:00
Denys Vlasenko
41ddd9f606 *: make exec failure message more consistent
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 01:46:53 +02:00
Denys Vlasenko
8fc9e6a15d httpd: fix proxy mode bug (annoying but harmless), better help text
function                                             old     new   delta
cgi_io_loop_and_exit                                 594     635     +41
packed_usage                                       26815   26841     +26
handle_incoming_and_exit                            2745    2739      -6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-02 10:40:58 +02:00
Denys Vlasenko
88aa558e5c *: do not check for POLLIN/POLLOUT only, just in case it's POLHUP/POLERR
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-02 15:02:45 +01:00
Bernhard Reutner-Fischer
ca228fb16d reuse a few strings
text    data     bss     dec     hex filename
 839040     453    6828  846321   ce9f1 busybox_old
 839019     453    6828  846300   ce9dc busybox_unstripped

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26 10:09:31 +01:00
Denys Vlasenko
cb23d93c68 *: add/remove safe_, it seems we had a few incorrect uses
function                                             old     new   delta
chat_main                                           1359    1361      +2
microcom_main                                        712     713      +1
ifplugd_main                                        1109    1110      +1
arpping                                              465     466      +1
acpid_main                                           440     441      +1
script_main                                         1069    1067      -2
cgi_io_loop_and_exit                                 594     591      -3
telnet_main                                         1475    1469      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/3 up/down: 6/-11)              Total: -5 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 12:29:55 +01:00
Denys Vlasenko
dbc6a7a8fd httpd -m: output salted MD5 hash. By (forrest AT hifulltech.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-16 02:28:50 +01:00
Denys Vlasenko
a3aa3e3095 wget: check for close success; fix chunked; do not bother to send QUIT to ftp
Also, random fixes to use %u for unsigned quantities. -14 bytes in wget.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 12:36:10 +01:00
Denys Vlasenko
33d8d08f78 httpd: shrink mime type matching code (suggested by Bernhard)
function                                             old     new   delta
static.suffixTable                                   100     231    +131
send_file_and_exit                                   625     658     +33
handle_incoming_and_exit                            2749    2745      -4
send_cgi_and_exit                                    936     901     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 164/-39)           Total: 125 bytes
   text    data     bss     dec     hex filename
 824631     458    6956  832045   cb22d busybox_old
 824550     458    6956  831964   cb1dc busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-10 01:46:02 +02:00
Denys Vlasenko
108b8c5367 httpd: fix bug 601 "I:index.php does not run interpreter on DIR/ url"
function                                             old     new   delta
parse_conf                                          1462    1485     +23
index_html                                             -      11     +11
handle_incoming_and_exit                            2762    2749     -13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 34/-13)             Total: 21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-08 21:17:49 +02:00
Denys Vlasenko
a4bcbd0e04 telnetd: properly close fds in child
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09 23:01:24 +02:00
Bernhard Reutner-Fischer
62851171db fix debug message
Print the mime-type only after it has been set.
  Add possible TODOs: use TCP_CORK, parse_config()
2009-05-04 09:57:25 +02:00
Denys Vlasenko
48a29defca httpd: speed up httpd.conf at the cost of 49 bytes of code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-02 00:50:38 +02:00
Denis Vlasenko
c8d7109f60 httpd: fix small bug in parser. it crept in during cleanup 2009-04-22 14:16:59 +00:00
Denis Vlasenko
00643ca520 httpd: allow empty lines in conf file 2009-04-22 13:52:22 +00:00
Denis Vlasenko
1cf4a0eb81 httpd: simplify insane conf file parser
function                                             old     new   delta
bb_simplify_abs_path_inplace                           -      98     +98
parse_expr                                           824     832      +8
passwd_main                                         1025    1027      +2
evalvar                                             1374    1376      +2
parse_command                                       1463    1460      -3
bb_simplify_path                                     137      55     -82
parse_conf                                          1572    1422    -150
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 3/3 up/down: 126/-251)         Total: -125 bytes
2009-04-22 13:49:16 +00:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
cbb4e61dd5 httpd: add comment explaining why SERVER_NAME etc is not set. 2009-03-18 20:00:46 +00:00
Denis Vlasenko
2ca84f6064 httpd: tiny optimization 2009-02-05 12:38:21 +00:00
Denis Vlasenko
1cbfd98ded httpd:
Kill config options by making them always on:

FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES

This makes httpd.c remotely readable - it had ~125 #ifdefs, now it has ~100.
The growth on a .config with all FEATURE_HTTPDs off is:

function                                             old     new   delta
send_file_and_exit                                     -     269    +269
parse_conf                                           683     763     +80
free_llist                                             -      32     +32
httpd_main                                           427     454     +27
sighup_handler                                         -      15     +15
handle_incoming_and_exit                            1110     905    -205
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 2/1 up/down: 423/-205)          Total: 218 bytes
2009-02-04 23:43:44 +00:00
Denis Vlasenko
04158e0459 udhcpd: add code which rejects lease files with suspicious or old timestamp.
*: s/time(0)/time(NULL)/g
2009-02-02 10:48:06 +00:00
Denis Vlasenko
9d1d4c06d7 httpd: set $HOST to Host: header value. +83 bytes.
by Tobias Poschwatta (tp AT fonz.de)
2008-11-22 20:29:35 +00:00
Bernhard Reutner-Fischer
b424930e4e - pass "Accept:" and "Accept-Language:" header to CGI scripts (Alina Friedrichsen)
Alina writes:
With this patch the BusyBox httpd pass the "Accept:" and
"Accept-Language:" header by the environment variables to the
CGI-Script, so this can make Content Negotiation to deliver the page in
the language, which was selected by the user in the browser settings,
and/or serve the XHTML page with the right MIME-Type
application/xhtml+xml to user agents which support it und text/html
which don't.

(Needed e.g. for OpenWrt LuCI.)

Signed-off-by: Alina Friedrichsen <x-alina at gmx dot net>
2008-09-01 15:30:49 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Bernhard Reutner-Fischer
d73cbd31a2 - first pass to unify/cleanup uid handling (-236b)
This needs further love, alot of love.. Tito?
2008-07-21 14:41:33 +00:00
Bernhard Reutner-Fischer
a53de7f7c2 - fix spelling 2008-07-21 13:46:54 +00:00
Denis Vlasenko
395410b748 httpd: add Hopedir directive specially for
(and by) walter harms <wharms AT bfs.de>;
 fix silly double-parse bug added in 21412.

function                                             old     new   delta
parse_conf                                          1532    1576     +44
2008-07-20 23:25:32 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
7504f2f5d2 httpd: fix authentication 2008-06-13 13:20:38 +00:00
Denis Vlasenko
25b463079d httpd: fix bugs in authentication (by Peter Korsgaard <jacmet ATuclibc.org>)
we were accepting empty username; also we were always checking
 dummy user:passwd pair ":" if user gave us wrong one.

function                                             old     new   delta
check_user_passwd                                    338     319     -19
2008-06-13 09:55:13 +00:00
Denis Vlasenko
0eb406caa8 htppd: lots of variable/function renaming in config file parsing.
fixed a bug where we trashed config file's name;
otherwise, should not have any real behavioral changes.

function                                             old     new   delta
check_user_passwd                                      -     338    +338
handle_incoming_and_exit                            2661    2649     -12
parse_conf                                          1650    1536    -114
checkPerm                                            338       -    -338
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/2 up/down: 338/-464)         Total: -126 bytes
2008-06-13 09:53:06 +00:00
Denis Vlasenko
fdddab0c61 make pw_encrypt() return malloc'ed string.
text    data     bss     dec     hex filename
 759802     604    6684  767090   bb472 busybox_old
 759804     604    6676  767084   bb46c busybox_unstripped
2008-06-12 16:56:52 +00:00
Denis Vlasenko
4ea83bf562 uclibc insists on having 70k static buffer for crypt.
For bbox it's not acceptable. Roll our own des and md5 crypt
implementation. Against older uclibc:

   text    data     bss     dec     hex filename
 759945     604    6684  767233   bb501 busybox_old
 759766     604    6684  767054   bb44e busybox_unstripped

so, we still save on code size.
2008-06-12 16:55:59 +00:00
Bernhard Reutner-Fischer
5e25ddb7d3 - use STD*_FILENO some more. No object-code changes 2008-05-19 09:48:17 +00:00
Denis Vlasenko
faf334aeb8 httpd: fix obscure case when user runs httpd -i from command line for testing.
(fixes bug 3334)

function                                             old     new   delta
httpd_main                                           743     757     +14
handle_incoming_and_exit                            2657    2669     +12
log_and_exit                                          75      43     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 26/-32)             Total: -6 bytes
2008-05-18 15:14:36 +00:00
Denis Vlasenko
6b06cb80be more of -Wall fixes from Cristian Ionescu-Idbohrn.
Some are fixing real bugs.

function                                             old     new   delta
syslogd_main                                         938     958     +20
get_signum                                           136     143      +7
obj_load                                             777     782      +5
recv_from_to                                         210     214      +4
get_next_block                                      1795    1799      +4
display_topmem_process_list                         1117    1121      +4
logread_main                                         484     487      +3
buffer_fill_and_print                                 73      76      +3
kill_main                                            687     689      +2
ll_remember_index                                    240     241      +1
do_stats                                             452     453      +1
if_readconf                                          166     165      -1
display_process_list                                1192    1191      -1
run_applet_and_exit                                  507     505      -2
print_signames                                        33      31      -2
parse_one_line                                      1092    1090      -2
find_out_spec                                         57      55      -2
add_ksymoops_symbols                                 421     419      -2
ash_main                                            1407    1402      -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17)            Total: 37 bytes
2008-05-15 21:30:45 +00:00
Denis Vlasenko
6bf05cf1ff httpd: fix several bugs triggering by realtive path in -h DIR.
function                                             old     new   delta
handle_incoming_and_exit                            2657    2659      +2
send_cgi_and_exit                                    869     862      -7
parse_conf                                          1647    1626     -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 2/-28)             Total: -26 bytes
2008-05-07 12:18:48 +00:00
Denis Vlasenko
b153ace939 httpd: restore HUP, CHLD and PIPE to SIG_DFL prior to execing CGI.
function                                             old     new   delta
send_cgi_and_exit                                    856     869     +13
2008-05-07 09:22:44 +00:00
Denis Vlasenko
c4523c2b3d fix a few stray unguarded strdup's 2008-03-28 02:24:59 +00:00
Denis Vlasenko
9230582315 inetd: use change_identity().
libbb: shrink our internal initgroups().
httpd: remove stray 'else' and 'index_page = "index.html"'

function                                             old     new   delta
httpd_main                                           750     743      -7
inetd_main                                          2033    2011     -22
bb_internal_initgroups                               251     228     -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-52)             Total: -52 bytes
2008-03-20 15:12:58 +00:00
Denis Vlasenko
9c8c038981 httpd: small fixlet for POST upload - skip
whitespace between "Content-length:" and number
2008-03-17 12:58:19 +00:00
Denis Vlasenko
85c247161b *: fix fallout from -Wunused-parameter
function                                             old     new   delta
bbunpack                                             358     366      +8
passwd_main                                         1070    1072      +2
handle_incoming_and_exit                            2651    2653      +2
getpty                                                88      86      -2
script_main                                          975     972      -3
inetd_main                                          2036    2033      -3
dname_enc                                            377     373      -4
make_new_session                                     474     462     -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24)            Total: -12 bytes
   text    data     bss     dec     hex filename
 797429     658    7428  805515   c4a8b busybox_old
 797417     658    7428  805503   c4a7f busybox_unstripped
2008-03-17 09:04:04 +00:00
Denis Vlasenko
68404f13d4 *: add -Wunused-parameter; fix resulting breakage
function                                             old     new   delta
procps_scan                                         1265    1298     +33
aliascmd                                             278     283      +5
parse_file_cmd                                       116     120      +4
dname_enc                                            373     377      +4
setcmd                                                90      93      +3
execcmd                                               57      60      +3
count_lines                                           72      74      +2
process_command_subs                                 340     339      -1
test_main                                            409     407      -2
mknod_main                                           179     177      -2
handle_incoming_and_exit                            2653    2651      -2
argstr                                              1312    1310      -2
shiftcmd                                             131     128      -3
exitcmd                                               46      43      -3
dotcmd                                               297     294      -3
breakcmd                                              86      83      -3
evalpipe                                             353     349      -4
evalcommand                                         1180    1176      -4
evalcmd                                              109     105      -4
send_tree                                            374     369      -5
mkfifo_main                                           82      77      -5
evalsubshell                                         152     147      -5
typecmd                                               75      69      -6
letcmd                                                61      55      -6
add_cmd                                             1190    1183      -7
main                                                 891     883      -8
ash_main                                            1415    1407      -8
parse_stream                                        1377    1367     -10
alloc_procps_scan                                     55       -     -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148)          Total: -94 bytes
   text    data     bss     dec     hex filename
 797195     658    7428  805281   c49a1 busybox_old
 797101     658    7428  805187   c4943 busybox_unstripped
2008-03-17 09:00:54 +00:00
Denis Vlasenko
8e2cfec1cd libbb: introduse and use signal_[no_]SA_RESTART_empty_mask and sigaction_set
signal_SA_RESTART_empty_mask                           -      65     +65
signal_no_SA_RESTART_empty_mask                        -      54     +54
dd_main                                             1325    1369     +44
sigaction_set                                          -      19     +19
dname_enc                                            373     377      +4
UNSPEC_print                                          64      66      +2
setsignal                                            296     294      -2
bb_signals_recursive                                  95      92      -3
bb_askpass                                           367     361      -6
inetd_main                                          1810    1797     -13
rx_main                                              912     883     -29
sigdelset                                             32       -     -32
__sigdelset                                           32       -     -32
__GI_sigdelset                                        32       -     -32
sighup_handler                                        84      37     -47
arping_main                                         1844    1797     -47
fsck_main                                           1869    1807     -62
run_list                                            1917    1844     -73
vlock_main                                           492     409     -83
progressmeter                                        883     798     -85
handle_incoming_and_exit                            2737    2651     -86
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 3/12 up/down: 188/-632)        Total: -444 bytes
2008-03-12 23:19:35 +00:00
Denis Vlasenko
1acb4ef87e httpd: fix breakage introduced by "support for I:index.xml" 2008-02-27 20:59:54 +00:00
Denis Vlasenko
574f2f4394 *: add optimization barrier to all "G trick" locations 2008-02-27 18:41:59 +00:00
Denis Vlasenko
2f518b078b httpd: "HEAD" support. Closes bug 1530.
send_file_and_exit                                   629     645     +16
static.request_HEAD                                    -       5      +5
handle_incoming_and_exit                            2732    2737      +5
send_headers                                         594     597      +3
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 29/0)               Total: 29 bytes
   text    data     bss     dec     hex filename
 796283     740    7484  804507   c469b busybox_old
 796312     740    7484  804536   c46b8 busybox_unstripped
2008-02-21 00:12:07 +00:00
Denis Vlasenko
671ca33aa1 init: make it NOMMU-capable
httpd: trivial compile fix
2008-02-19 14:13:20 +00:00
Denis Vlasenko
3718832a15 *: more readable handling of pipe fds. No code changes. 2008-02-16 13:20:56 +00:00
Denis Vlasenko
284d0faed6 random s/short/int/
add_cmd                                             1189    1190      +1
xconnect_ftpdata                                     118     117      -1
data_align                                            86      84      -2
process_files                                       2101    2096      -5
forkexec                                            1345    1334     -11
2008-02-16 13:18:17 +00:00
Denis Vlasenko
fc21305892 httpd: fix bug where we did chdir("") if CGI path had only one "/".
httpd: fix bug 2004: wrong argv when interpreter is invoked

+8 bytes growth
2008-02-11 16:26:22 +00:00
Denis Vlasenko
7dbf1b4d9e httpd: add a bit of error logging; a few code simplifications. +29 bytes. 2008-02-08 15:21:55 +00:00
Bernhard Reutner-Fischer
8c69afd992 - be C99 friendly. Anonymous unions are a GNU extension. This change is
size-neutral WRT -std=gnu99 and fixes several compilation errors for strict
  C99 mode.
2008-01-29 10:33:34 +00:00
Denis Vlasenko
fb0eba706c libbb: introduce and use safe_waitpid (loops in EINTR)
*: use more approproate (shorter) versions of wait()

function                                             old     new   delta
safe_waitpid                                           -      48     +48
wait_any_nohang                                        -      17     +17
send_tree                                            365     369      +4
processorstop                                        432     435      +3
text_yank                                            110     108      -2
make_human_readable_str                              202     200      -2
crond_main                                          1368    1366      -2
handle_sigchld                                        49      43      -6
reapchild                                            166     159      -7
custom                                               260     250     -10
checkscript                                          191     177     -14
wait_nohang                                           17       -     -17
wait_pid                                              43       -     -43
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103)           Total: -31 bytes
2008-01-02 19:55:04 +00:00
Denis Vlasenko
fcd878efcd httpd: support for "I:index.xml" syntax (Peter Korsgaard <jacmet@uclibc.org>)
function                                             old     new   delta
parse_conf                                          1481    1507     +26
handle_incoming_and_exit                            2650    2663     +13
httpd_main                                           749     759     +10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 49/0)               Total: 49 bytes
2007-12-29 02:16:23 +00:00
Denis Vlasenko
78ee7c853a httpd: fix trivial bug (spotted by Alex Landau) 2007-10-21 23:24:42 +00:00
Denis Vlasenko
34cd7afc49 httpd: free big buffer after use; improve grep-ability of 'headers' variable 2007-10-18 13:01:22 +00:00
Denis Vlasenko
f74194e942 xatonum.h: add comment
lineedit: fix typo in comment
httpd: support for proxying connection to other http server
(by Alex Landau <landau_alex@yahoo.com>)
2007-10-18 12:54:39 +00:00
Denis Vlasenko
3f5fdc7572 remove trailing whitespace 2007-10-14 04:55:59 +00:00
Denis Vlasenko
4a4575686e httpd: fix bug where we were trying to read more POSTDATA than content-length 2007-10-14 02:34:20 +00:00
Denis Vlasenko
9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
0c97c9d437 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
263 bytes saved.
2007-10-01 11:58:38 +00:00
Denis Vlasenko
3d2a9217a7 httpd: trivial simplification 2007-09-28 22:35:29 +00:00
Denis Vlasenko
5d61e71c3a introduce safe_poll (fixes a problem in top)
function                                             old     new   delta
safe_poll                                              -      77     +77
svlogd_main                                         1470    1466      -4
zcip_main                                           1530    1524      -6
forkexec                                            1345    1338      -7
decode_format_string                                 795     788      -7
collect_blk                                          474     467      -7
buffer_pread                                         540     532      -8
tftp                                                1182    1172     -10
microcom_main                                        763     749     -14
arpping                                              441     424     -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/9 up/down: 77/-80)             Total: -3 bytes
   text    data     bss     dec     hex filename
 770162    1034   10404  781600   bed20 busybox_old
 770158    1034   10404  781596   bed1c busybox_unstripped
2007-09-27 10:09:59 +00:00
Denis Vlasenko
35465a3f00 httpd: small auth and IPv6 fixes (Kim B. Heino <Kim.Heino@bluegiga.com>) 2007-09-25 11:58:33 +00:00
Denis Vlasenko
32a471e4db httpd: simplify CGI i/o loop. -200 bytes. 2007-09-23 13:56:57 +00:00
Denis Vlasenko
f431017535 httpd: optional support for partial downloads 2007-09-21 22:35:18 +00:00
Denis Vlasenko
2535f12cf2 httpd: do not clear environment
mount: mount helpers support (by Vladimir Dronnikov <dronnikov@gmail.ru>)
2007-09-15 13:28:30 +00:00
Denis Vlasenko
72b6a65b2f httpd: fix buglet in hex conversion. Remove alloca NULL checks
(never happens, app just crashes if stack overflows)
svlogd: cosmetic messages and style fixes
2007-08-21 11:18:25 +00:00
Denis Vlasenko
e58e8d9444 httpd: add optional support for error pages
(by Pierre Metras <genepi@sympatico.ca>)
2007-08-21 10:26:55 +00:00
Denis Vlasenko
63db27f9f4 removed stray debugging comments 2007-08-19 21:24:37 +00:00
Denis Vlasenko
d867f32a7a httpd: explain IP/mask parsing, and simplify it a bit.
parse_conf                                          1258    1247     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-11)             Total: -11 bytes
   text    data     bss     dec     hex filename
 772602    1058   11092  784752   bf970 busybox_old
 772594    1058   11092  784744   bf968 busybox_unstripped
2007-08-19 21:15:42 +00:00
Denis Vlasenko
921799da4e httpd: reinstate (much lighter) paranoid connection close code
allegedly needed for some versions of IE. +45 bytes.
2007-08-19 19:28:09 +00:00
Denis Vlasenko
37c3316fd7 httpd: get rid of rmt_port and setenv_log 2007-08-19 18:54:22 +00:00
Denis Vlasenko
52e15dc50b httpd: get rid of sscanf usage. Rename some variables. 2007-08-19 18:53:43 +00:00