use strict;
use warnings;
+# No, really, we have to use standard input.
+## no critic (InputOutput::ProhibitExplicitStdin)
+
# Check whether the password is "password".
while (defined(my $line = <STDIN>)) {
if ($line =~ m{ \A new-password: [ ] password \n \z }xms) {
- warn "weak password\n"
- or die "Cannot write to standard output: $!\n";
+ warn "weak password\n";
exit(0);
}
}
# Create the Authen::Kerberos::Kadmin object.
my $kadmin = Authen::Kerberos::Kadmin->new(
{
- realm => 'TEST.EXAMPLE.COM',
- server => 1,
password_quality => 1,
+ realm => 'TEST.EXAMPLE.COM',
+ server => 1,
}
);
isa_ok($kadmin, 'Authen::Kerberos::Kadmin');
# The same should fail if we attempt it with an unknown database.
$kadmin = Authen::Kerberos::Kadmin->new(
{
- realm => 'BOGUS.EXAMPLE.COM',
- server => 1,
+ realm => 'BOGUS.EXAMPLE.COM',
+ server => 1,
}
);
ok(!eval { $kadmin->chpass('test@TEST.EXAMPLE.COM', 'some password') },