New GPL'ed obscure.c replacement
Rob Landley
rob at landley.net
Wed Jan 18 23:07:49 UTC 2006
On Wednesday 18 January 2006 09:12, Bernhard Fischer wrote:
> On Wed, Jan 18, 2006 at 02:46:06PM +0100, Tito wrote:
> >Hi to all,
> >this is a proposal to substitute obscure.c with a new GPL'ed version.
> >This is just a proof of concept for auditing and review by the list
> > members. This version is more restrictive than the previous ( maybe to
> > much?)
>
> What about a
> config CONFIG_PASSWD_STRENGTH
> bool " minimal strength for new password"
> depends on CONFIG_PASSWORD
> default 2
> range 0 4
> help
> 0 .. don't check strength of password
> 1 .. at least one different kind of character class
> 2 .. at least two different kinds of character classes
> 3 .. at least three different kinds of character classes
> 4 .. at least four different kinds of character classes
I tend to have an aversion to presenting people with more config choices than
are strictly necessary. If we have a "CONFIG_NITPICK" then sure, but by
default it should either be on or off.
That said, in my cleanup I was bumping it down to three of the four. :)
> >Comments, critics and improvements are as always welcome.
> >
> >BTW: as this function is used only by passwd.c I think this file
> > should be moved from libbb/ to loginutils/ dir.
>
> Moving it to loginutils would be fine with me.
If the only user is passwd.c then moving it _into_ passwd works for me.
(Keeping in mind we'll want a chpasswd too, but if that can be built from the
same source file...)
> I think empty passwords should be allowed too, at least optional. YMMV.
Only root should be able to set them, and this checking should not apply to
root except as a warning.
> >static int string_checker_helper(const char *p1, const char *p2)
>
> perhaps attribute_pure
When platform.h goes in, by all means. (What's attribute_pure?)
Memo: please document in platform.h what each one of these suckers DOES. :)
> Looks nice from a short glance :)
Agreed. Of course that's not stopping me from rewriting large chunks of
it... :)
Rob
--
Steve Ballmer: Innovation! Inigo Montoya: You keep using that word.
I do not think it means what you think it means.
More information about the busybox
mailing list