Bug#364526: debian-installer: Please implement a password-checking module
Op 19-06-2007 om 21:58 schreef Masami Ichikawa:
<snip/>
> +
> + # password shouldn't be a login account.
> + if test "$user" = "$passwd"; then
> + return 0
> + fi
> +
> + # password shouldn't contain login account.
> + ret=`echo $passwd | grep -ci $user`
> + if test $ret = 1; then
> + if test $passwd_len -ge $user_len; then
> + return 0
> + fi
> + fi
Those three tests can be reduced to one single test:
+ # password shouldn't contain login account.
+ ret=`echo $passwd | grep -ci $user`
+ if test $ret = 1; then
+ return 0
+ fi
Cheers
Geert Stappers
Reply to: