Commit Graph

25 Commits

Author SHA1 Message Date
Tito Ragusa
9eb7bfd4d4 passwd,chpasswd: reset password in /etc/passwd to "x" if /etc/shadow was updated
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-05 00:18:33 +02:00
Pere Orga
6a3e01d5a9 move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-03 01:33:55 +02:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +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
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
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
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
Bernhard Reutner-Fischer
9b44613202 - don't free user-supplied string (via -e)
- fix helptext

function                                             old     new   delta
chpasswd_main                                        300     319     +19
packed_usage                                       24352   24344      -8
.rodata                                           122227  122195     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 19/-40)            Total: -21 bytes
2008-08-05 09:56:56 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +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
Denis Vlasenko
8ee649a02e *: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/ 2008-03-26 20:04:27 +00:00
Denis Vlasenko
c93b162248 patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)
*: removal of #include <getopt.h>
2008-03-23 22:55:25 +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
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
fe7cd642b0 don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
   text    data     bss     dec     hex filename
 773469    1058   11092  785619   bfcd3 busybox_old
 772644    1058   11092  784794   bf99a busybox_unstripped
2007-08-18 15:32:12 +00:00
Denis Vlasenko
6a2f7f41cf whitespace fixes, no code changes 2007-08-16 10:35:17 +00:00
Denis Vlasenko
6ca409e0e4 trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
  of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts

size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
990d0f63ee Replace index_in_[sub]str_array with index_in_[sub]strings,
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.

   text    data     bss     dec     hex filename
 781266    1328   11844  794438   c1f46 busybox_old
 781010    1328   11844  794182   c1e46 busybox_unstripped
2007-07-24 15:54:42 +00:00
Denis Vlasenko
64a8a3bd74 chpasswd: rename long options definition to match other applets. no code changes 2007-07-23 18:49:16 +00:00
Denis Vlasenko
bdc88fdc68 rework long option handling. saves ~1.2k
function                                             old     new   delta
tar_longopts                                           -     222    +222
static.udhcpc_longopts                                 -     192    +192
start_stop_daemon_longopts                             -     150    +150
getopt32                                            1045    1185    +140
static.wget_longopts                                   -     111    +111
static.od_longopts                                     -     105    +105
getopt_longopts                                        -      96     +96
install_longopts                                       -      67     +67
ipcalc_longopts                                        -      63     +63
static.hwclock_longopts                                -      54     +54
ftpgetput_longopts                                     -      52     +52
static.dumpleases_longopts                             -      32     +32
env_longopts                                           -      31     +31
runparts_longopts                                      -      30     +30
mv_longopts                                            -      24     +24
mkdir_longopts                                         -      19     +19
find_pair                                            164     180     +16
bb_null_long_options                                   -      16     +16
setconsole_longopts                                    -      10     +10
display_speed                                         91      98      +7
collect_blk                                          467     474      +7
show_color                                             4       1      -3
ls_main                                              913     904      -9
bb_default_long_options                               16       -     -16
ls_color_opt                                          32      10     -22
setconsole_long_options                               32       -     -32
arith                                               2077    2030     -47
mv_long_options                                       48       -     -48
mkdir_long_options                                    48       -     -48
env_long_options                                      48       -     -48
static.options                                       248     184     -64
runparts_long_options                                 80       -     -80
ftpgetput_long_options                                96       -     -96
static.hwclock_long_options                          112       -    -112
install_long_options                                 112       -    -112
static.long_options                                  144       -    -144
static.wget_long_options                             160       -    -160
longopts                                             160       -    -160
static.arg_options                                   304       -    -304
tar_long_options                                     320       -    -320
long_options                                         384       -    -384
------------------------------------------------------------------------------
(add/remove: 17/15 grow/shrink: 4/5 up/down: 1444/-2209)     Total: -765 bytes
   text    data     bss     dec     hex filename
 782618    1328   11900  795846   c24c6 busybox_old
 781354    1328   11900  794582   c1fd6 busybox_unstripped
2007-07-23 17:14:14 +00:00
Denis Vlasenko
845db2acf3 chpasswd: fix indentation 2007-07-21 22:29:26 +00:00
Denis Vlasenko
e8feca085d chpasswd: fixes for shadow password handling 2007-07-21 13:54:26 +00:00
Denis Vlasenko
557fb713e0 chpasswd: fixes and code shrink
update_passwd                                        732     734      +2
chpasswd_main                                        318     292     -26
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-26)             Total: -24 bytes
   text    data     bss     dec     hex filename
 781564    1168   11900  794632   c2008 busybox_old
 781548    1168   11900  794616   c1ff8 busybox_unstripped
2007-07-21 13:25:28 +00:00
Denis Vlasenko
1ec5eaecba chpasswd: now with svn add 2007-07-20 21:29:49 +00:00