struct passwd *getpwent()
{
        static char *line;
        static struct passwd pw;
        size_t size=0;
        if (!f) f = fopen("/etc/passwd", "rbe");
        if (!f) return 0;
        return __getpwent_a(f, &pw, &line, &size);
}

I would prefer that even "struct passwd" is malloced...

But more importantly, bbox can't optimize only for musl.
Other libc'es  may have static line buffers there.

And musl will eventually be forced to implement getpwent_r()
if it wants to be usable for more packages... so...
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to