Age | Commit message (Collapse) | Author |
|
This needs further love, alot of love.. Tito?
|
|
|
|
text data bss dec hex filename
759802 604 6684 767090 bb472 busybox_old
759804 604 6676 767084 bb46c busybox_unstripped
|
|
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.
|
|
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
|
|
which sets same handler for many signals. sig_catch is nuked
(bb_signals_recursive is more descriptive name).
*: use them as appropriate.
function old new delta
bb_signals_recursive - 95 +95
bb_signals - 52 +52
run_command 258 273 +15
svlogd_main 1368 1377 +9
runsv_main 1746 1752 +6
runsvdir_main 1643 1646 +3
UNSPEC_print 64 66 +2
time_main 1128 1127 -1
...
resize_main 246 210 -36
sig_catch 63 - -63
set_fatal_sighandler 85 14 -71
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 5/24 up/down: 182/-548) Total: -366 bytes
|
|
|
|
adduser: implement -S and code shrink / fix uid selection
*: sanitize getspnam_r use
text data bss dec hex filename
777042 974 9676 787692 c04ec busybox_old
776883 974 9676 787533 c044d busybox_unstripped
|
|
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
|
|
(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
|
|
passwd!
getspnam is guilty, it lies that user record exists in shadow.
|
|
comment thoroughly when they die and when they dont.
|
|
|
|
*: s/include "busybox.h"/include "libbb.h"
|
|
(by Thomas Lundquist <lists@zelow.no>)
|
|
fall back to ordinary one
Reduced usage of functions returning datain static buffers.
(mostly passwd/group/shadow related):
function old new delta
correct_password 143 193 +50
sulogin_main 490 533 +43
adduser_main 732 774 +42
passwd_main 1875 1915 +40
addgroup_main 330 365 +35
bb_internal_getspnam 38 - -38
bb_internal_fgetpwent 38 - -38
bb_internal_fgetgrent 38 - -38
static.resultbuf 168 88 -80
static.buffer 1872 1104 -768
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 5/2 up/down: 210/-962) Total: -752 bytes
|
|
no preceding prototype
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if current trend will continue ;)
|
|
|
|
(really generated different salts even if called back-to-back).
|
|
* do not make backup copy by copying (just retain old file)
* correctly fall back to /etc/passwd if user is not in shadow
* fix bug with overlong passwd entries
* be permissive on some kinds of failures
* reduce stack usage
* code size: -500 bytes
|
|
|
|
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
|
|
|
|
|
|
automatically by function itself.
|
|
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
|
|
|
|
|
|
some #ifdef removal from me.
|
|
|
|
definitions. (That should only be on prototypes.)
|
|
text data bss dec hex filename
1652855 14444 1215616 2882915 2bfd63 busybox.oorig.gcc-3.3
1652823 14444 1215616 2882883 2bfd43 busybox.gcc-3.3
1603655 14412 1215552 2833619 2b3cd3 busybox.oorig.gcc-3.4
1603655 14412 1215552 2833619 2b3cd3 busybox.gcc-3.4
1609755 14508 1215744 2840007 2b55c7 busybox.oorig.gcc-4.0
1609755 14508 1215744 2840007 2b55c7 busybox.gcc-4.0
1590495 13516 1215392 2819403 2b054b busybox.oorig.gcc-4.1-HEAD
1590495 13516 1215392 2819403 2b054b busybox.gcc-4.1-HEAD
1589079 13036 1213248 2815363 2af583 busybox.oorig.gcc-4.2-HEAD
1589079 13036 1213248 2815363 2af583 busybox.gcc-4.2-HEAD
|
|
|
|
|
|
my_getpwnam -> bb_xgetpwnam /* dies on error */
my_getgrnam -> bb_xgetgrnam /* dies on error */
my_getgrgid -> bb_getgrgid
my_getpwuid -> bb_getpwuid
my_getug -> bb_getug
|
|
which were otherwise cluttering the global namespace.
|
|
modified by myself to retain check for shadow file access.
|
|
Hi Erik,
Hi to all,
This is part five of the my_get*id story.
I've tweaked a bit this two functions to make them more flexible,
but this changes will not affect existing code.
Now they work so:
1) my_getpwuid( char *user, uid_t uid, int bufsize)
if bufsize is > 0 char *user cannot be set to NULL
on success username is written on static allocated buffer
on failure uid as string is written to buffer and NULL is returned
if bufsize is = 0 char *user can be set to NULL
on success username is returned
on failure NULL is returned
if bufsize is < 0 char *user can be set to NULL
on success username is returned
on failure an error message is printed and the program exits
2) 1) my_getgrgid( char *group, uid_t uid, int bufsize)
if bufsize is > 0 char *group cannot be set to NULL
on success groupname is written on static allocated buffer
on failure gid as string is written to buffer and NULL is returned
if bufsize is = 0 char *group can be set to NULL
on success groupname is returned
on failure NULL is returned
if bufsize is < 0 char *group can be set to nULL
on success groupname is returned
on failure an error message is printed and the program exits
This changes were needed mainly for my new id applet.
It is somewhat bigger then the previous but matches the behaviour of GNU id
and is capable to handle usernames of whatever length.
BTW: at a first look it seems to me that it will integrate well (with just a few changes)
with the pending patch in patches/id_groups_alias.patch.
The increase in size is balanced by the removal of my_getpwnamegid.c
from libbb as this was used only in previous id applet and by size optimizations
made possible in whoami.c and in passwd.c.
I know that we are in feature freeze but I think that i've tested it enough
(at least I hope so.......).
|
|
|
|
|
|
|
|
|
|
#49: I found one memory overflow and memory leak in "ln" applet.
Last patch reduced also 54 bytes. ;)
#50: I found bug in loginutils/Makefile.in.
New patch have also new function to libbb and
aplied this to applets and other cosmetic changes.
|