[PATCH] passwd size reduction take 6

Tito farmatito at tiscali.it
Wed Jan 25 20:08:58 UTC 2006


Hi,
This is take 6 of passwd size reduction and this time
I think I've got it right..

The program now acts more like the real passwd on my linux box:
1) allow 3 retries as long as a good (not easy to guess)  new password is typed (for normal user)
2) override obscure password checking for root
3) don't ask for old password again if obscure test fails.
4) exits on password retype mismatch.
5) use bb_do_delay in all errors related to asking for the old password in new_password() .
6) rip out -a switch (non standard: on my system it is -a -all), hope nobody complains.....
7) default to use salted passwords (more secure?!).
8) generate random salt if /dev/random could be opened
9) use /etc/shadow when CONFIG_FEATURE_SHADOWPASSWDS is enabled
     only if the /etc/shadow exists else default to /etc/passwd.
10) fix the license as suggested on the list.
11) code cleanup

Size reduction is:

   text    data     bss     dec     hex filename
   3166       0     160    3326     cfe passwd.o.orig
   2009  136     140    2285     8ed passwd.o

Thanks in advance  to all for your help,
As before patch and whole file for auditing are attached.
Patch is against svn revision 13608.

Please apply if you think it is ok.

Ciao,
Tito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passwd06.patch
Type: text/x-diff
Size: 17144 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060125/40d6ff2d/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passwd.c.tar.bz2
Type: application/x-tbz
Size: 3426 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060125/40d6ff2d/attachment-0001.bin 


More information about the busybox mailing list