Commit Graph

1510 Commits

Author SHA1 Message Date
Denis Vlasenko
f54e62a3f2 inetd: do not trash errno in signal handlers;
in CHLD handler, stop looping through services when pid is found

function                                             old     new   delta
reread_config_file                                  1072    1092     +20
retry_network_setup                                   55      69     +14
reap_child                                           132     130      -2
2008-07-22 20:57:28 +00:00
Bernhard Reutner-Fischer
3e8669f359 - wrap overlong lines (Cristian Ionescu-Idbohrn)
- s/\.  /. /g;# (me)
2008-07-22 18:27:53 +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
1101d1c980 telnet: shrink
telnetd: shrink, and fix issue file printing
test: better and shorter usage text

function                                             old     new   delta
putiac2                                               51      50      -1
putiac                                                24      20      -4
handlenetoutput                                       95      91      -4
telnet_main                                         1480    1475      -5
iacflush                                              37      32      -5
make_new_session                                     436     421     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-34)             Total: -34 bytes
2008-07-21 09:22:28 +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
eb7512984a udhcp: use libbb for config file parsing (by Vladimir)
function                                             old     new   delta
read_config                                          313     230     -83
2008-07-20 17:58:12 +00:00
Denis Vlasenko
a34f1ed737 dnsd,sestatus: use libbb to parse config file (by Vladimir)
function                                             old     new   delta
dnsd_main                                           1544    1487     -57
2008-07-20 17:48:59 +00:00
Denis Vlasenko
2e157ddf9e libbb: updated config_parse() from Vladimir
function                                             old     new   delta
config_read                                          385     460     +75
runsvdir_main                                       1701    1716     +15
readit                                               331     338      +7
passwd_main                                         1049    1053      +4
parse_command                                       1504    1507      +3
decode_format_string                                 822     824      +2
bb__parsespent                                       117     119      +2
udhcp_get_option                                     221     222      +1
changepath                                           196     194      -2
parse_inittab                                        400     396      -4
nameif_main                                          683     679      -4
make_device                                         1176    1172      -4
config_open                                           48      40      -8
expand_main                                          698     689      -9
readcmd                                             1012    1002     -10
config_free_data                                      37      21     -16
SynchronizeFile                                      683     643     -40
sleep_main                                           474     362    -112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209)        Total: -100 bytes
2008-07-19 09:27:19 +00:00
Denis Vlasenko
7354244c4a sendmail: update from the maintainer 2008-07-17 19:37:09 +00:00
Bernhard Reutner-Fischer
02a1c6a7c3 - very minor shrinkage (-9b) 2008-07-17 15:13:31 +00:00
Bernhard Reutner-Fischer
679212836a - fix segfault in nameif with mactab file
(by fixing and shrink config parser)

function                                             old     new   delta
config_free_data                                       -      37     +37
config_open                                           43      48      +5
pack_gzip                                           1658    1660      +2
nameif_main                                          527     525      -2
SynchronizeFile                                      629     623      -6
make_device                                         1184    1176      -8
config_close                                          31      18     -13
config_read                                          431     393     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/5 up/down: 44/-67)            Total: -23 bytes
2008-07-17 11:59:13 +00:00
Denis Vlasenko
fb1642f2ca fix up callsites of config_read to check for >= 0 2008-07-16 23:04:49 +00:00
Denis Vlasenko
c01340fe26 update of config file parser from Vladimir 2008-07-16 22:12:18 +00:00
Denis Vlasenko
38e54f1c13 sendmail: do not discard all headers 2008-07-16 21:55:03 +00:00
Denis Vlasenko
0ed090e184 sendmail: do not ignore CC; accept to: and cc: case-insensitively.
+20 bytes.
2008-07-15 20:56:23 +00:00
Denis Vlasenko
a46dd89e94 cpio: internalize archive_xread_all_eof. add a few paranoia checks
for corrupted cpio files.
modprobe-small: remove stray include
route: small code shrink

function                                             old     new   delta
get_header_cpio                                      958     980     +22
archive_xread_all_eof                                 33       -     -33
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 22/-33)            Total: -11 bytes
2008-07-12 09:20:44 +00:00
Denis Vlasenko
deeed59de0 libbb: introduce and use xrealloc_vector
function                                             old     new   delta
xrealloc_vector_helper                                 -      51     +51
create_list                                           84      99     +15
getopt_main                                          690     695      +5
passwd_main                                         1049    1053      +4
get_cached                                            85      89      +4
msh_main                                            1377    1380      +3
add_match                                             42      41      -1
read_lines                                           720     718      -2
grave                                               1068    1066      -2
fill_match_lines                                     143     141      -2
add_to_dirlist                                        67      65      -2
add_input_file                                        49      47      -2
act                                                  252     250      -2
fsck_main                                           2252    2246      -6
man_main                                             765     757      -8
bb_internal_initgroups                               228     220      -8
cut_main                                            1052    1041     -11
add_edge_to_node                                      55      43     -12
dpkg_main                                           3851    3835     -16
ifupdown_main                                       2202    2178     -24
sort_main                                            838     812     -26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124)          Total: -42 bytes
2008-07-08 05:14:36 +00:00
Denis Vlasenko
493829207c ifupdown: /etc/network/interfaces can have comments with leading blanks 2008-07-08 03:25:25 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
fa0b56db76 sendmail: fix wrong vfork usage here too
*: shorten error texts

function                                             old     new   delta
launch_helper                                          -     151    +151
vfork_or_die                                          20       -     -20
sendgetmail_main                                    1946    1848     -98
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 151/-118)           Total: 33 bytes
2008-07-01 16:09:07 +00:00
Denis Vlasenko
82604e9730 revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
2008-07-01 15:59:42 +00:00
Denis Vlasenko
58d60c3333 *: introduce and use xfork()
function                                             old     new   delta
xfork                                                  -      20     +20
msh_main                                            1377    1380      +3
mod_process                                          455     446      -9
forkexit_or_rexec                                     30      17     -13
expand_variables                                    1434    1421     -13
open_transformer                                      91      76     -15
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/4 up/down: 23/-50)            Total: -27 bytes
2008-07-01 11:11:24 +00:00
Denis Vlasenko
3da5572bfa *: introduce and use xvfork()
function                                             old     new   delta
time_main                                           1052    1285    +233
crontab_main                                         623     856    +233
ifupdown_main                                       2202    2403    +201
xvfork                                                 -      20     +20
passwd_main                                         1049    1053      +4
grave                                               1068    1066      -2
script_main                                          935     921     -14
vfork_or_die                                          20       -     -20
vfork_compressor                                     206     175     -31
open_as_user                                         109       -    -109
popen2                                               218       -    -218
edit_file                                            910     690    -220
run_command                                          268       -    -268
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 4/4 up/down: 691/-882)         Total: -191 bytes
2008-07-01 10:40:41 +00:00
Denis Vlasenko
c94d3564c2 sendmail: from Vladimir:
Here comes the third part of compatibility patch for sendmail.
* Introduced new safe_getdomainname() -- will it be useful?
* Fixed SEGV if sender address is missed. Should snoop for sender address in mail headers?
* More compat: use HOSTNAME instead of HOST when no server is explicitly specified.
* crond: fixed mail recipient address.

function                                             old     new   delta
safe_getdomainname                                     -      56     +56
sendgetmail_main                                    1937    1946      +9
grep_file                                            846     850      +4
crond_main                                          1423    1425      +2
xstrtoull_range_sfx                                  295     296      +1
utoa_to_buf                                          110     108      -2
passwd_main                                         1053    1049      -4
sv_main                                             1234    1228      -6
parse_expr                                           841     833      -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/4 up/down: 72/-20)             Total: 52 bytes
2008-06-30 13:30:21 +00:00
Denis Vlasenko
0db2c2eb71 libiproute: print_route() always uses stdout, do not pass FILE pointer to it.
libiproute: Use FAST_FUNC

function                                             old     new   delta
iprule_modify                                        884     905     +21
ipaddr_modify                                       1289    1310     +21
rtnl_send                                             53      69     +16
xrtnl_wilddump_request                               109     124     +15
xrtnl_dump_filter                                    394     403      +9
rtnl_talk                                            534     539      +5
print_addrinfo                                      1369    1374      +5
iproute_modify                                      1017    1020      +3
iprule_list                                           81      83      +2
xrtnl_open                                           163     161      -2
parse_rtattr                                          89      87      -2
ipaddr_list_or_flush                                2176    2174      -2
addattr_l                                             91      88      -3
flush_update                                         116     108      -8
iproute_list_or_flush                               1285    1263     -22
iproute_get                                          878     852     -26
print_route                                         1913    1752    -161
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 9/8 up/down: 97/-226)          Total: -129 bytes
2008-06-29 06:22:40 +00:00
Denis Vlasenko
540ab7097c wget: "support" -t and -T by ignoring them 2008-06-29 00:32:35 +00:00
Denis Vlasenko
6ea75e2f5d sendmail: another update from the maintainer
function                                             old     new   delta
sendgetmail_main                                    1894    1937     +43
crond_main                                          1416    1423      +7
packed_usage                                       24540   24470     -70
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 50/-70)            Total: -20 bytes
2008-06-28 21:46:41 +00:00
Denis Vlasenko
3dee8e2bac sendmail: update from maintainer 2008-06-27 21:24:08 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
7049ff8696 whitespace fixes. no code changes 2008-06-25 09:53:17 +00:00
Denis Vlasenko
50b5cac59f wget: accept code 204. 2008-06-22 16:28:02 +00:00
Denis Vlasenko
dd9c072846 udhcpc: change BPF filter to not use 0xffffffff as a max packet size,
there are kernels which don't like big (negative when viewed as signed)
sizes.
2008-06-20 12:17:59 +00:00
Denis Vlasenko
31e1286365 tftp: help compiler a bit 2008-06-16 07:32:40 +00:00
Denis Vlasenko
8474cd38f3 tftpd: PXE server said to need to support "tsize" option
(by Pascal Bellard <pascal.bellard AT ads-lu.com>).
 Conditional on blocksize option && tftpd support.

function                                             old     new   delta
tftp_protocol                                       1488    1670    +182
tftp_get_option                                        -     102    +102
tftpd_main                                           494     538     +44
tftp_main                                            252     254      +2
tftp_get_blksize                                      97       -     -97
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/0 up/down: 330/-97)           Total: 233 bytes
2008-06-16 07:12:19 +00:00
Denis Vlasenko
f45c4f41b7 whitespace and comment fixes, no code changes 2008-06-16 04:09:25 +00:00
Denis Vlasenko
ff7cd6f925 use USE_FEATURE_UDHCP_PORT instead of ifdef 2008-06-15 09:58:53 +00:00
Denis Vlasenko
f716a6da9a udhcpc: removing stray whitespace 2008-06-15 09:49:21 +00:00
Denis Vlasenko
d50dda8c35 *: use llist_pop for traverse-and-free list operation
function                                             old     new   delta
append_file_list_to_list                             109     111      +2
udhcpc_main                                         2414    2413      -1
run_parts_main                                       325     324      -1
od_main                                             2324    2323      -1
getopt_main                                          709     707      -2
env_main                                             253     251      -2
sed_main                                             659     656      -3
ps_main                                              522     519      -3
traceroute_main                                     3960    3954      -6
sort_main                                            844     838      -6
diff_main                                            866     858      -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33)            Total: -31 bytes
2008-06-15 05:40:56 +00:00
Denis Vlasenko
873b895d50 udhcpc: reduce ifdef forest, no code changes 2008-06-15 05:40:08 +00:00
Denis Vlasenko
21765fa063 udhcpc: kill undocumented -W, it was a no-op.
fix option parsing in the case some CONFIG_x are off.
 disable -b on NOMMU, make backgrounding work correctly
 (if a bit differently from MMU case). Previously,
 it wasn't working at all.
 stop using global data for flags in main(), opt
 bitfield works as well.

function                                             old     new   delta
cryptpw_main                                         177     153     -24
packed_usage                                       24478   24452     -26
client_background                                     26       -     -26
udhcpc_main                                         2462    2372     -90
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/3 up/down: 0/-166)           Total: -166 bytes
2008-06-13 20:44:05 +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
9de4622055 - make the first arg of the filter function passed to rtnl_dump_filter constant
to match normal iproute. No obj-code changes.
2008-06-12 15:54:49 +00:00
Denis Vlasenko
048897c971 ifenslave: small shrink
text    data     bss     dec     hex filename
 809731     624    7060  817415   c7907 busybox_old
 809629     624    7060  817313   c78a1 busybox_unstripped
2008-06-08 08:01:12 +00:00
Denis Vlasenko
52a8d975da ip: make numeric table work: "ip route list table 255". closes bug 3664.
function                                             old     new   delta
iproute_list_or_flush                               1270    1300     +30
2008-06-08 00:25:55 +00:00