[RFC, PATCH] passwd size reduction

Tito farmatito at tiscali.it
Mon Nov 27 21:12:52 UTC 2006


On Monday 27 November 2006 19:07, Bernhard Fischer wrote:
> >--- loginutils/passwd.c.01e	2006-11-27 18:00:52.000000000 +0100
> >+++ loginutils/passwd.c	2006-11-27 18:44:02.000000000 +0100
> >@@ -25,13 +25,12 @@
> > 
> > static int update_passwd(const struct passwd *pw, const char *crypt_pw)
> > {
> >-	char filename[1024];
> >-	char buf[1025];
> >+	char *filename;
> >+	char *buf;
> > 	char buffer[80];
> > 	char username[32];
> > 	char *pw_rest;
> >-	int mask;
> >-	int continued;
> >+	int continued = 0;
> 
> Silly typo. That should have read continued = 1;
> Sorry.
> 

Hi,
Bernard I have a copy of the partial rewrote of passwd i was doing with Rob 
long time ago and I think that at least the passwd_main function
was well optimised. Maybe you want to take a look at it as it could save
you some time. I ported it to the last libbb API.
Rob had some patches concerning security maybe he is able to find them....
In the meanwhile i will take a look at your patches.

Ciao,
Tito

-------------- next part --------------
A non-text attachment was scrubbed...
Name: passwd.c
Type: text/x-csrc
Size: 7986 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061127/e0a5f723/attachment-0002.c 


More information about the busybox mailing list