From 50d3cd92ea42f76d5a76ec43d869dd8d721ff5f4 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 26 Sep 2007 18:03:36 +0000 Subject: Add tests for the Kerberos v5 to Kerberos v4 name mapping and do more tests of the machinery around kaserver synchronization even if we don't have a full configuration. --- perl/Wallet/Object/Keytab.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'perl/Wallet/Object/Keytab.pm') diff --git a/perl/Wallet/Object/Keytab.pm b/perl/Wallet/Object/Keytab.pm index 4ae8e10..5f128b0 100644 --- a/perl/Wallet/Object/Keytab.pm +++ b/perl/Wallet/Object/Keytab.pm @@ -185,11 +185,9 @@ sub kaserver_name { my %host = map { $_ => 1 } qw(host ident imap pop smtp); $k5 =~ s/\@.*//; my @parts = split ('/', $k5); - if (@parts == 1) { - return $parts[0]; - } elsif (@parts > 2) { + if (@parts > 2) { return undef; - } elsif ($host{$parts[0]}) { + } elsif (@parts == 2 and $host{$parts[0]}) { $parts[1] =~ s/\..*//; $parts[0] = 'rcmd' if $parts[0] eq 'host'; } -- cgit v1.2.3