[RFC, PATCH] passwd size reduction

Bernhard Fischer rep.nop at aon.at
Tue Nov 28 07:55:02 UTC 2006


On Mon, Nov 27, 2006 at 11:02:21PM +0100, Tito wrote:
>On Monday 27 November 2006 19:00, Bernhard Fischer wrote:
>> Hi,
>> 
>> I'm attaching a (minor, non-intrusive) shrinkage of passwd. Note that
>> it was only compile-tested, so don't check this in as-is!
>> 
>> Tito, vda, i'd be glad if you'd give it a whirl, if you find the time.
>> You need to apply all patches in ascending order.
>> 
>> thanks!
>> 
>> passwd.o.orig:	current svn
>> passwd.o.01b:	remove get_algo. the helptext needs updating to remove
>> sha1 since this was not supported anyway, AFAICS.
>> passwd.o.01c:	move some _main state vars into 'opt'; includes
>> non-existing 01b-patch, sorry.
>> passwd.o.01d:	move some more _main uid-related state vars into 'opt'
>> passwd.o.01e:	sanitize error pathes
>> passwd.o.01f:	sanitize some more error pathes and reuse more of libbb
>> 
>Hi, here some one more patch with some more optimizations, only compile tested.
>passwd.01g:  minor optimizations on syslog, text strings, etc.


I'll take a look at your rewrite of it.
One remark to your (and also the current svn) version:
We should use the retval of
snprintf(bb_common_bufsiz1, BUFSIZ, "%s-", filename);
to put the '+' there to make the strlen() call go away.

cheers,
Bernhard



More information about the busybox mailing list