Denys Vlasenko
8684cbb5cc
libbb: robustify isXXXX(). +39 bytes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18 11:34:43 +01:00
Denys Vlasenko
6331cf059c
*: use "can't" instead of "cannot"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denys Vlasenko
c6fb2a6b5f
passwd: do not complain if /etc/shadow is missing
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 19:18:49 +01:00
Denys Vlasenko
8131eea3dc
*: introduce and use ffulsh_all()
...
function old new delta
buffer_fill_and_print 179 196 +17
fflush_all - 9 +9
spawn 87 92 +5
rtcwake_main 455 453 -2
...
alarm_intr 93 84 -9
readcmd 1072 1062 -10
bb_ask 345 333 -12
more_main 845 832 -13
flush_stdout_stderr 42 23 -19
xfflush_stdout 27 - -27
flush_stderr 30 - -30
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 14:19:51 +01:00
Denys Vlasenko
85ca327529
*: random code shrink
...
function old new delta
alarm_handler 50 46 -4
ask 228 211 -17
rtcwake_main 474 455 -19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-29 13:27:31 +01:00
Denys Vlasenko
f2cbb03a37
*: optimize most of isXXXXX() macros
...
text data bss dec hex filename
824164 453 6812 831429 cafc5 busybox_old
823730 453 6812 830995 cae13 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 03:16:08 +02:00
Denys Vlasenko
adf922ec28
*: a few more NOINLINEs
...
function old new delta
print_linkinfo - 815 +815
do_msg - 783 +783
INET_setroute - 757 +757
varvalue - 746 +746
do_sem - 637 +637
inflate_codes - 617 +617
INET6_setroute - 491 +491
edir - 370 +370
sync_cursor - 298 +298
update_utmp - 246 +246
searchLines - 165 +165
setup_alarm - 144 +144
may_wakeup - 101 +101
getNum 566 371 -195
refresh 1166 848 -318
rtcwake_main 809 479 -330
getty_main 2396 1921 -475
chpst_main 1373 746 -627
inflate_unzip_internal 1335 567 -768
evalvar 1384 612 -772
ipaddr_list_or_flush 2160 1246 -914
route_main 1585 245 -1340
ipcs_main 2523 1049 -1474
------------------------------------------------------------------------------
(add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213) Total: -1043 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08 14:35:37 +02:00
Denys Vlasenko
c297ea97e2
login: log PAM errors to syslog, not stderr
...
By Ian Wienand (ianw AT vmware.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-25 01:50:45 +02:00
Denys Vlasenko
d069e5398d
a few more GCC-isms removed
...
text data bss dec hex filename
824641 458 6956 832055 cb237 busybox_old
824631 458 6956 832045 cb22d busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-09 23:12:10 +02:00
Denys Vlasenko
2907e79749
add comment about /etc/gshadow, no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-13 01:27:47 +02:00
Denys Vlasenko
189f74d0f2
passwd + /etc/shadow: chage "change time" field too
...
function old new delta
update_passwd 1171 1270 +99
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-13 01:15:30 +02:00
Denys Vlasenko
09e63bb81f
df: fix "df /"
...
also, clean up mount checks in mkfs/fsck.
function old new delta
find_mount_point 243 261 +18
sha1_process_block64 497 510 +13
find_main 436 444 +8
display_speed 85 90 +5
df_main 795 793 -2
parse_command 1463 1460 -3
static.ignored_mounts 8 - -8
mkfs_minix_main 2962 2937 -25
fsck_minix_main 3065 2970 -95
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/4 up/down: 44/-133) Total: -89 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 04:50:36 +02:00
Denys Vlasenko
9b1b62adc4
Patches to enable FreeBSD build
...
platform.h: fix wrong check for endianness, fix lchown
aliasing to chown on uclibc.
Code seems to not be affected in my testing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 03:34:12 +02:00
Denys Vlasenko
f3b92d3856
getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
...
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 12:10:38 +02:00
Denys Vlasenko
bf2af9acb2
flash_lock, flash_unlock: new applets
...
By Thierry Reding (thierry.reding AT avionic-design.de)
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-25 04:15:37 +02:00
Denys Vlasenko
1b0a93edb9
adduser/addgroup: make system id range configurable.
...
By Tito (farmatito AT tiscali.it).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-14 00:23:34 +02:00
Denis Vlasenko
c2931aa2df
adduser/addgroup: support specifying uid/gid, add system
...
account creation mode. By Tito.
function old new delta
adduser_main 650 726 +76
addgroup_main 341 402 +61
addgroup_longopts - 16 +16
adduser_longopts 97 103 +6
packed_usage 26161 26163 +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 161/0) Total: 161 bytes
2009-04-22 21:35:52 +00:00
Denis Vlasenko
f9d4fc3cf8
switch_root: improve behavior on error; improve help text
...
*: make "can't execute '%s'" message uniform
2009-04-21 20:40:51 +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
7223424815
pointless whitespace/comment fixes, no code changes
2009-04-14 09:58:11 +00:00
Denis Vlasenko
829bbd3b57
*: unify concurrent-safe update of /etc/{passwd,group,[g]shadow}
...
by Tito (farmatito AT tiscali.it)
function old new delta
update_passwd 743 1171 +428
bb_perror_nomsg - 9 +9
find_main 436 444 +8
passwd_main 1023 1027 +4
nameval 202 206 +4
chpasswd_main 315 319 +4
bb__parsespent 119 117 -2
adduser_main 654 650 -4
addgroup_main 345 341 -4
sv_main 1228 1222 -6
deluser_main 173 160 -13
bb_internal_putpwent 69 - -69
add_user_to_group 231 - -231
del_line_matching 460 31 -429
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 5/6 up/down: 457/-758) Total: -301 bytes
2009-04-14 00:51:05 +00:00
Denis Vlasenko
32a385f5b0
getty: fix handling of speed 0;
...
stop using non-portable way of setting speeds.
function old new delta
cfsetispeed - 76 +76
cfsetospeed - 57 +57
cfgetispeed - 20 +20
2009-04-12 13:05:40 +00:00
Mike Frysinger
fe013a74ff
patch by Stuart Hughes <seh@zee2.com> and Guenter <lists@gknw.net> to make "0" a special baud rate for getty where it uses this as "leave baud rate unchanged"
2009-04-09 07:08:04 +00:00
Denis Vlasenko
3266aa9ec2
trailing whitespace removal
2009-04-01 11:24:04 +00:00
Denis Vlasenko
a2333c8938
randomtest fixes
2009-03-28 19:08:23 +00:00
Denis Vlasenko
54ac03a618
*: remove LOG_NOWAIT
2009-03-11 15:59:49 +00:00
Denis Vlasenko
73c571a5ff
*: move get_sock_lsa and xwrite_str to libbb, use where appropriate
...
function old new delta
get_sock_lsa - 72 +72
buffer_fill_and_print 179 196 +17
parse_expr 824 832 +8
read_base64 343 348 +5
nameval 202 206 +4
fbset_main 1694 1698 +4
expand 1849 1853 +4
udhcp_send_kernel_packet 249 252 +3
udhcp_get_option 223 222 -1
chat_main 1246 1245 -1
pack_gzip 1661 1659 -2
doset 299 297 -2
bb__parsespent 119 117 -2
test_main 260 257 -3
qgravechar 109 106 -3
tcpudpsvd_main 1834 1830 -4
sysctl_display_all 589 580 -9
xopen_xwrite_close 44 33 -11
prs 30 18 -12
find_main 418 406 -12
full_write2_str 25 12 -13
adduser_main 667 654 -13
evaltreenr 817 802 -15
evaltree 817 802 -15
tftpd_main 526 493 -33
ftpd_main 2050 1990 -60
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211) Total: -94 bytes
2009-03-09 00:12:37 +00:00
Denis Vlasenko
8e5de2aab7
login: fix buglet introduced by "simplification"
2009-02-24 17:10:24 +00:00
Denis Vlasenko
512c8ae053
login: small simplification by Walter Harms. -10 bytes
2009-02-02 00:15:57 +00:00
Denis Vlasenko
4eff8efa59
login: cleanup work by Walter Harms. No logic changes.
2009-02-02 00:15:00 +00:00
Denis Vlasenko
f478fde33c
adduser: allow adding to group 0; don't _create_ /etc/shadow,
...
only append data if it exists.
function old new delta
adduser_main 642 667 +25
2009-01-12 09:20:49 +00:00
Bernhard Reutner-Fischer
e44a4e316d
- isascii() is obsolescent in SUSv4 and furthermore looks redundant in this spot
2009-01-09 14:49:11 +00:00
Denis Vlasenko
4e12b1a2a9
libbb: introduce and use xmalloc_ttyname (-32 in bss).
...
ash: small code shrink
text data bss dec hex filename
793669 504 7524 801697 c3ba1 busybox_old
793659 504 7492 801655 c3b77 busybox_unstripped
2008-12-23 23:36:47 +00:00
Denis Vlasenko
db12d1d733
Fix forgotten license comments
2008-12-07 00:52:58 +00:00
Denis Vlasenko
15437e3e2a
libbb: add xgetgrnam too. ~0 code size change
2008-12-05 16:23:06 +00:00
Bernhard Reutner-Fischer
9c6d12993f
- -4b and use proper define; add license note
2008-12-04 14:19:21 +00:00
Denis Vlasenko
e45930e890
Fold mkpasswd applet into cryptpw.
...
mkpasswd is in Debian, OTOH cryptpw was added to busybox earlier.
Trying to make both camps happy by making those two applets just aliases.
They are command-line compatible. We can decide whether we want to drop one
(and which one) later.
function old new delta
cryptpw_main 183 314 +131
static.methods 21 - -21
packed_usage 25707 25648 -59
mkpasswd_main 307 - -307
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/1 up/down: 131/-387) Total: -256 bytes
2008-12-04 12:05:26 +00:00
Denis Vlasenko
d7a805efaf
libbb: introduce and use xgetpwnam. ~ -150 bytes.
2008-12-03 19:05:55 +00:00
Bernhard Reutner-Fischer
82b1429966
- add new applet mkpasswd(1)
...
function old new delta
bb_ask - 355 +355
mkpasswd_main - 296 +296
.rodata 121746 121847 +101
packed_usage 24632 24689 +57
static.methods - 21 +21
gmatch 229 248 +19
bb_ask_stdin - 11 +11
applet_names 1949 1958 +9
applet_main 1172 1176 +4
sulogin_main 503 505 +2
applet_nameofs 586 588 +2
sha256_hash 329 327 -2
correct_password 208 206 -2
parse_command 1442 1439 -3
get_cred_or_die 145 141 -4
passwd_main 1054 1044 -10
bb_askpass 348 - -348
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 7/5 up/down: 877/-369) Total: 508 bytes
2008-12-03 18:48:39 +00:00
Denis Vlasenko
0c68a874e7
libbb: password/group function helpers rewritten by Tito:
...
function old new delta
xgetpwuid - 27 +27
uid2uname_utoa - 22 +22
gid2group_utoa - 22 +22
uid2uname - 18 +18
gid2group - 18 +18
buffer_fill_and_print 179 196 +17
print_user 12 24 +12
print_group 12 24 +12
get_cached 89 99 +10
...
print_common 134 120 -14
vlock_main 415 396 -19
logger_main 410 387 -23
crontab_main 642 609 -33
bb_getpwuid 42 - -42
bb_getgrgid 42 - -42
bb_getug 80 - -80
------------------------------------------------------------------------------
(add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296) Total: -109 bytes
2008-12-02 22:56:59 +00:00
Denis Vlasenko
9e0a7c9c41
remove a few superfluous includes
2008-11-25 13:33:11 +00:00
Denis Vlasenko
6b1e3d7e73
libbb: remove glibc-style bloat from sha_crypt. -1130 bytes.
...
cryptpw: add more difficult test vectors.
2008-11-13 12:23:46 +00:00
Denis Vlasenko
2211d5268c
libbb: add optionl support for SHA256/512 encrypted passwords
...
function old new delta
sha_crypt - 2423 +2423
cryptpw_main 128 183 +55
to64 - 29 +29
pw_encrypt 974 1000 +26
str_rounds - 11 +11
login_main 1532 1541 +9
packed_usage 25215 25200 -15
__md5_to64 29 - -29
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/1 up/down: 2553/-44) Total: 2509 bytes
2008-11-10 18:52:35 +00:00
Denis Vlasenko
3fa36e2350
*: a bit of code shrink
...
function old new delta
stop_handler 41 38 -3
sulogin_main 508 504 -4
got_cont 4 - -4
cont_handler 11 - -11
startservice 309 297 -12
processorstart 423 409 -14
tcpudpsvd_main 1861 1843 -18
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/5 up/down: 0/-66) Total: -66 bytes
2008-11-09 00:15:11 +00:00
Denis Vlasenko
73cc54388d
move documentation to docs/
2008-11-08 22:31:19 +00:00
Denis Vlasenko
2ec94a7ee8
login: fix /etc/nologin handling (should prohibit non-root LOGINS,
...
not running login by non-root). minor code shrink.
function old new delta
login_main 1669 1602 -67
2008-11-07 12:59:31 +00:00
Denis Vlasenko
694b514148
login: fix /etc/nologin support
...
build system: fix config warnings ("Overlong line")
function old new delta
login_main 1735 1774 +39
__libc_tcdrain - 23 +23
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 62/0) Total: 62 bytes
2008-11-07 01:12:16 +00:00
Denis Vlasenko
202ac504e1
*: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, xx) op
...
function old new delta
tcsetattr_stdin_TCSANOW - 14 +14
set_sane_term 116 113 -3
top_main 1277 1273 -4
make_new_session 421 415 -6
rawmode 133 126 -7
reset_term 18 10 -8
die 43 35 -8
cookmode 62 54 -8
vlock_main 425 415 -10
read_line_input 3165 3155 -10
bb_askpass 357 347 -10
fsck_minix_main 3079 3065 -14
getty_main 2375 2332 -43
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131) Total: -117 bytes
2008-11-05 13:20:58 +00:00
Denis Vlasenko
905ed8730f
add serial HOWTO doc
2008-11-05 12:19:39 +00:00
Denis Vlasenko
40fdcbb270
more whitespace fixes
2008-10-29 01:20:13 +00:00