Commit Graph

1665 Commits

Author SHA1 Message Date
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
Denys Vlasenko
9c35a1cfb6 ifplugd: fix warnings 2009-05-01 09:04:25 +02:00
Denys Vlasenko
47aaa2bee6 Make it clearer that usually people should _NOT_
select FEATURE_UNIX_LOCAL.
2009-05-01 03:00:04 +02:00
Denis Vlasenko
1fd3b38fd1 *: bb_error_msg's messages should not be capitalized 2009-04-29 12:02:57 +00:00
Denis Vlasenko
80e57eb7d5 ifplugd: tiny shrink 2009-04-26 01:43:36 +00:00
Denis Vlasenko
f4e4563fe7 ifplugd: add copyright 2009-04-26 01:17:44 +00:00
Denis Vlasenko
71c165780a ifplugd: new applet by Maksym Kryzhanovskyy (xmaks AT email.cz)
+3k code and 0.5k in messages. Most of the bloat due to compat :(
2009-04-26 01:08:51 +00:00
Denis Vlasenko
f6b4685691 add FEATURE_UNIX_LOCAL. By Ingo van Lil (inguin AT gmx.de) 2009-04-25 13:16:53 +00:00
Denis Vlasenko
eb4e5ecc32 inetd: constify data 2009-04-22 23:25:48 +00: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
8ed1945a91 nc: free lsa in server mode, we might be up for a long time 2009-04-21 23:51:43 +00:00
Denis Vlasenko
a771e7c005 *: remove check for errors on getsockaddr in cases we know they can't happen
libbb: make get_sock_lsa use only one getsockaddr syscall, not two

function                                             old     new   delta
get_sock_lsa                                          72     101     +29
do_iplink                                           1151    1137     -14
arping_main                                         1585    1569     -16
dolisten                                             789     755     -34
xrtnl_open                                           161      94     -67
2009-04-21 23:48:38 +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
76478b8091 udhcpc: fix truncation of last char in client hostnames 2009-04-21 00:41:57 +00:00
Denis Vlasenko
c7cc5a9432 mdev: Rob's #if forest removal
*: remove superfluous conts in "f(type *const param)"
2009-04-19 01:27:20 +00:00
Denis Vlasenko
0b791d9a97 move llist_find_str from modutils to libbb 2009-04-13 20:52:00 +00:00
Denis Vlasenko
e8a796828e dhcprelay: fix usage text. Simplify and make code more readable.
Add TODOs.
2009-04-13 03:33:46 +00:00
Denis Vlasenko
ef1b439669 dnsd: stop using oversized buffer. trim comment. 2009-04-12 19:03:01 +00:00
Denis Vlasenko
5c32993009 mount: users report that CIFS support is breaking things,
mostly remove it.
2009-04-12 12:16:21 +00:00
Denis Vlasenko
f8de411e24 dnsd: removed highly questionable setting of signals to SIG_IGN 2009-04-12 04:20:22 +00:00
Denis Vlasenko
ddbf3bf35f dnsd: fix a number of bugs. Ideas by Ming-Ching Tiew (mctiew AT yahoo.com)
function                                             old     new   delta
undot                                                  -      42     +42
dnsd_main                                           1394    1213    -181
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 42/-181)          Total: -139 bytes
2009-04-12 04:09:09 +00:00
Denis Vlasenko
f81e8dbc74 *: make "pragma GCC visibility push(hidden)" less ugly 2009-04-09 12:35:13 +00:00
Denis Vlasenko
42e78b978f ftpd: s/CONFIG_BUSYBOX_EXEC_PATH/bb_busybox_exec_path/ 2009-04-04 20:34:22 +00:00
Denis Vlasenko
551ffdccea more of pointless whitespace fixes 2009-04-01 19:48:05 +00:00
Denis Vlasenko
bd79c3d337 dhcpd: remember and record hostnames; optimize get_option
dumpleases: show hostnames

function                                             old     new   delta
add_lease                                            230     292     +62
send_offer                                           403     421     +18
send_ACK                                             232     249     +17
read_leases                                          249     258      +9
dumpleases_main                                      604     609      +5
nobody_responds_to_arp                                84      86      +2
udhcp_end_option                                      32      30      -2
udhcp_get_option                                     222     171     -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/2 up/down: 113/-53)            Total: 60 bytes
2009-04-01 12:36:09 +00:00
Denis Vlasenko
f9beb61a81 tftp: when we infer local name from remote (-r [/]path/path/file),
strip path. This mimics wget and is generally more intuitive.
2009-03-25 03:55:53 +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
9f57cf6604 ftpd: fix command fetching to not do it in 1-byte reads;
fix command de-escaping. Tested to download files with embeeded \xff and LF.
libbb: tweaks for the above

function                                             old     new   delta
ftpd_main                                           2231    2321     +90
xmalloc_fgets_internal                               190     222     +32
xmalloc_fgets_str_len                                  -      27     +27
xmalloc_fgets_str                                      7      23     +16
xmalloc_fgetline_str                                  10      26     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 181/0)             Total: 181 bytes
2009-03-18 17:32:44 +00:00
Denis Vlasenko
fce4a9454c ftpd: add some comments 2009-03-18 16:02:54 +00:00
Denis Vlasenko
e3b840ce98 ftpd: trim messages (but make sure they still make sense)
text    data     bss     dec     hex filename                                                                                                                               
   4400       0       0    4400    1130 ftpd_old.o
   4346       0       0    4346    10fa ftpd.o
2009-03-18 14:25:28 +00:00
Denis Vlasenko
5b492ee876 ftpd: do not use nasty tricks for re-execing if we are on MMU machine.
On NOMMU, code is alomost the same, on MMU:

function                                             old     new   delta
handle_dir_common                                    223     390    +167
ftpd_main                                           2306    2231     -75
popen_ls                                             203       -    -203
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/1 up/down: 167/-278)         Total: -111 bytes
2009-03-18 14:12:22 +00:00
Denis Vlasenko
1432cb4bd9 ftpd: add support for MDTM, I see clients often use it,
it may allow client-side caching.

function                                             old     new   delta
ftpd_main                                           2232    2306     +74
gmtime_r                                               -      19     +19
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 93/0)               Total: 93 bytes
2009-03-18 00:45:00 +00:00
Denis Vlasenko
3a7a1eba2e ftpd: document NLST format 2009-03-17 13:03:06 +00:00
Denis Vlasenko
1a82555108 ftpd: instead of wordy HELP, implement useful, and smaller, FEAT.
(HELP is still "supported" as an alias to FEAT)

   text    data     bss     dec     hex filename
 807331     468    7856  815655   c7227 busybox_old
 807246     468    7856  815570   c71d2 busybox_unstripped
2009-03-17 12:40:34 +00:00
Denis Vlasenko
edb0de4283 ftpd: implement -vv verbosity
function                                             old     new   delta
ftpd_main                                           2097    2190     +93
verbose_log                                            -      33     +33
cmdio_write_raw                                       12      34     +22
cmdio_write_ok                                        25      45     +20
cmdio_write_error                                     25      45     +20
cmdio_write                                           62      78     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/0 up/down: 204/0)             Total: 204 bytes
2009-03-17 12:23:24 +00:00
Denis Vlasenko
e6c94a611a ftpd: tweak timeout code 2009-03-17 05:11:51 +00:00
Denis Vlasenko
074c9036b2 ftpd: fix thinko: set_nport takes port in network order 2009-03-16 21:01:41 +00:00
Denis Vlasenko
fbf5846ce1 ftpd: dont use fdprintf for simple status messages
function                                             old     new   delta
ftpd_main                                           2025    2055     +30
cmdio_write_ok                                        17      25      +8
cmdio_write_error                                     17      25      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 46/0)               Total: 46 bytes
2009-03-16 20:54:45 +00:00
Denis Vlasenko
43bb7bba3b ftpd: simplify PORT check by assuming IP = peer's IP.
Should be as safe as before this change.

function                                             old     new   delta
ftpd_main                                           2115    2025     -90
2009-03-16 19:54:06 +00:00
Denis Vlasenko
20c8216897 ftpd: add idle and absolute timeouts. This is a security issue,
otherwise ftpd may end up hanging indefinitely.

function                                             old     new   delta
timeout_handler                                        -     110    +110
ftpd_main                                           2019    2115     +96
packed_usage                                       25662   25685     +23
handle_upload_common                                 306     322     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 245/0)             Total: 245 bytes
2009-03-16 16:19:53 +00:00
Denis Vlasenko
f2160b6a09 ftpd: security tightened up:
PORT is not allowed on !IPv4
 PORT must have IP == peer's IP
 upload is allowed only into regular files

function                                             old     new   delta
ftpd_main                                           1815    2019    +204
handle_upload_common                                 260     306     +46
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 250/0)             Total: 250 bytes
2009-03-16 14:53:54 +00:00
Denis Vlasenko
fc58ba1298 ftpd: fix the bug where >2GB file ops report errors;
make a few simplifications; add TODOs.

function                                             old     new   delta
port_or_pasv_was_seen                                  -      37     +37
get_remote_transfer_fd                               104     109      +5
handle_upload_common                                 265     260      -5
handle_dir_common                                    228     223      -5
popen_ls                                             211     203      -8
ftpd_main                                           1825    1815     -10
data_transfer_checks_ok                               37       -     -37
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/4 up/down: 42/-65)            Total: -23 bytes
2009-03-15 15:54:58 +00:00
Denis Vlasenko
54ac03a618 *: remove LOG_NOWAIT 2009-03-11 15:59:49 +00:00
Denis Vlasenko
4221e90ae4 ftpd: stop unconditional logging to syslog. This was the only applet
which was doing it. Added option -S to enable it when desired.

function                                             old     new   delta
packed_usage                                       25647   25666     +19
ftpd_main                                           1826    1825      -1
2009-03-11 15:07:44 +00:00
Denis Vlasenko
a19e64933c docs/logging_and_backgrounding.txt: new mini-doc
dnsd: remove statics, remove nerly-useless SIGINT handler
crond: correct more of logfile to 0666 (as usual, umask allows
 user to remove unwanted bits).
nameif: print errors to stderr too, not just to syslog

function                                             old     new   delta
udhcp_read_interface                                 308     306      -2
ttl                                                    4       -      -4
fileconf                                               4       -      -4
dnsentry                                               4       -      -4
interrupt                                             19       -     -19
dnsd_main                                           1463    1394     -69
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/2 up/down: 0/-102)           Total: -102 bytes
   text    data     bss     dec     hex filename
 808161     476    7864  816501   c7575 busybox_old
 807994     468    7856  816318   c74be busybox_unstripped
2009-03-11 14:40:00 +00:00
Denis Vlasenko
5b28d314e7 ftpd: add LOG_NDELAY to openlog 2009-03-09 17:22:16 +00:00
Denis Vlasenko
c41cba5a57 ftpd: reuse ls applet for LIST/NLST/STAT generation
function                                             old     new   delta
popen_ls                                               -     211    +211
ftpd_main                                           1760    1826     +66
handle_dir_common                                    199     228     +29
get_remote_transfer_fd                                89     104     +15
replace_char                                          30      34      +4
handle_upload_common                                 263     265      +2
bind_for_passive_mode                                129     121      -8
cmdio_write                                           84      62     -22
escape_text                                          166     136     -30
init_data_sock_params                                 81       -     -81
ftpdataio_dispose_transfer_fd                         87       -     -87
write_dirstats                                       149       -    -149
write_filestats                                      603       -    -603
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 11/5 up/down: 384/-986)        Total: -602 bytes
   text    data     bss     dec     hex filename
 808804     476    7864  817144   c77f8 busybox_old
 808156     476    7864  816496   c7570 busybox_unstripped
2009-03-09 15:46:07 +00:00