New GPL'ed obscure.c replacement
Tito
farmatito at tiscali.it
Wed Jan 18 16:15:51 UTC 2006
On Wednesday 18 January 2006 16:12, you wrote:
> On Wed, Jan 18, 2006 at 02:46:06PM +0100, Tito wrote:
> 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
>
> A character class is one of
> - capital letter
> - lowercase letter
> - number
> - other (none of the above)
>
> That way it could be small if no checking was requested.
>
> Just an idea
Maybe a little simpler:
config CONFIG_PASSWD_STRENGTH
bool "check for weak new passwords"
depends on CONFIG_PASSWD
so if it is not set we can remove the check from passwd code and
the full obscure.c code.
>
> I think empty passwords should be allowed too, at least optional. YMMV.
Hmmm.... root can delete your passwd if he wants, just ask ;-)
> >
> >static int string_checker_helper(const char *p1, const char *p2)
> perhaps attribute_pure
What's this for? I googled a little but have not found a good explanation.
> >{
> > /* as-is or capitalized */
> > if (strcasecmp(p1, p2) == 0
> > /* as sub-string */
Fixes applied, Thx.
I will repost it in a few days, maybe there will be other comments.
Ciao,
Tito
More information about the busybox
mailing list