# We run the principal tests three times, for CrackLib, CDB, and SQLite.
$count += 2 * scalar(@{ $tests{principal} });
+# We run the length checks twice.
+$count += scalar(@{ $tests{length} });
+
# We can now calculate our plan based on three tests for each password test,
# plus 21 additional tests for error handling.
plan(tests => $count * 3 + 21);
check_password($test);
}
+# Add a CrackLib dictionary and a maximum password length setting.
+$krb5_conf = create_krb5_conf(
+ {
+ password_dictionary => "$datadir/dictionary",
+ minimum_length => 12,
+ cracklib_maxlen => 11,
+ }
+);
+local $ENV{KRB5_CONFIG} = $krb5_conf;
+
+# Run the length checks again. They should have the same result, even though
+# there's a CrackLib dictionary, since the dictionary hit is above the minimum
+# length.
+note('Password length checks with cracklib_maxlen');
+for my $test (@{ $tests{length} }) {
+ check_password($test);
+}
+
# Install the krb5.conf file for simple character class restrictions.
$krb5_conf = create_krb5_conf(
{