[PATCH] passwd size reduction take 5
Tito
farmatito at tiscali.it
Fri Jan 20 14:05:48 UTC 2006
Hi,
This is take 5 of passwd size reduction
and just adds a minor fix (see 11) .
The program now acts more like the real passwd on my linux box:
1) loop as long as a good (not easy to guess) new password is typed (for normal user)
2) override obscure password checking for root
3) loop and retry on password retype mismatch.
4) use bb_do_delay in all errors related to asking for the old password in new_password() .
5) rip out -a switch (non standard: on my system it is -a -all), hope nobody complains.....
6) default to use salted passwords (more secure?!).
7) fix the license as suggested on the list.
8) code cleanup
9) Don't ask for old password again if obscure or retype fails.
10) Allow max 3 retries.
11) use /etc/shadow when CONFIG_FEATURE_SHADOWPASSWDS is enabled
only if the /etc/shadow exists else default to /etc/passwd.
Size reduction is:
root at localhost:/dev/pts/0:/root/Desktop/busybox/loginutils# size passwd.o.orig
text data bss dec hex filename
3166 0 160 3326 cfe passwd.o.orig
2015 4 289 2308 904 passwd.o
Thanks in advance to all for your help,
PS: Bernard, I think this could be checked in now. The only thing missing is (on Rob's request)
a warning if a weak password is used by root, but I will not add this as passwd on my box
doesn't do it. Maybe this could go in obscure.c.....
BTW, while you are at it there is also an adduser addgroup cleanup and pwd2spwd removal
patch posted that is trivial but space saving and could be applied also.
Ciao,
Tito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passwd.c
Type: text/x-csrc
Size: 8062 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060120/5dacb9f8/attachment.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passwd.c.tar.gz
Type: application/x-tgz
Size: 3325 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060120/5dacb9f8/attachment.bin
More information about the busybox
mailing list