On 7/20/07, Tito <[EMAIL PROTECTED]> wrote:
> Hi,
Hi,

> would something like passwd USER PASSWORD work for you?
Unfortunately it won't, the reason being that the distro has two
variants of core system (one busybox based and another -- coreutils
based), and at least bootstrapping procedure relies on both variants
having chpasswd. (and of course, both variants have to provide roughly
same functionality). Not to mention a perfectly valid statement made
here http://busybox.net/lists/busybox/2007-July/028093.html

> If yes, can you please test this modified version of passwd.
> So we can avoid code duplication.
Is it really better than having another little function?

> The non interactive mode is switched on with a config option.
> Add this to loginutils/Config.in after config FEATURE_PASSWD_WEAK_CHECK.
> ---------------------------------
> config FEATURE_NON_INTERACTIVE_PASSWD
>         bool "Allow passwords to be set non interactively (UNSAFE)"
>         default n
>         depends on PASSWD
>         help
>           With this option passwd will accept USER and PASSWD from
>           the command line and set them non interactively.
>           THIS IS UNSAFE!!!
> ------------------------------------
>
> and use passwd.c as drop-in replacement.
> (TODO the help text in usage.h needs to be fixed.)
>
> This is only a little tested, hints, critics and improvements are welcome.
> If this solution is not ok for you i'll give one more look at your patch.
Well, I'd be grateful. If you still find code duplication matter
serious here, I'd volunteer to invest some time into reworking
{ch,}passwd.c to minimize/eliminate this duplication.

Regards,
-- 
Alex
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to