diff -Nur -x '*.orig' -x '*.rej' e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/console/system_password.pm mezzanine_patched_e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/console/system_password.pm --- e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/console/system_password.pm 2008-01-06 05:03:30.000000000 -0700 +++ mezzanine_patched_e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/console/system_password.pm 2008-01-06 05:00:59.000000000 -0700 @@ -105,23 +105,15 @@ gettext(" it is too simplistic/systematic"); gettext(" it is based on a dictionary word"); gettext(" it is based on a (reversed) dictionary word"); + gettext(" it does not contain numbers"); + gettext(" it does not contain uppercase characters"); + gettext(" it does not contain lowercase characters"); + gettext(" it does not contain special characters"); #-------------------------------------------------------- - my $reason; - $_ = $choice1; - if (length($_) < 7) - { - $reason = "it is too short"; - } - elsif (!(/\d/ and /[A-Z]/ and /[a-z]/ and /\W/)) - { - $reason = "it is too simplistic/systematic"; - } - if ( -f '/usr/lib64/cracklib_dict.hwm' ) { - $reason ||= fascist_check($choice1, '/usr/lib64/cracklib_dict'); - } else { - $reason ||= fascist_check($choice1, '/usr/lib/cracklib_dict'); - } + my $strength = $db->get_prop("passwordstrength", "Admin"); + my $reason = esmith::util::validatePassword($choice1,$strength); + # Untaint return data from cracklib, so we can use it later. We # trust the library, so we accept anything. $reason =~ /(.+)/; $reason = $1;