From b895ba0ae2baab93badb6d3f59dac14a7443f0b9 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Mon, 8 Feb 2010 19:34:33 -0800 Subject: Don't default the Heimdal kadmin server to localhost If there is no kadmin host set in the configuration, it's supposed to fall back on the krb5.conf setting, not hard-code localhost. --- perl/Wallet/Kadmin/Heimdal.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perl/Wallet/Kadmin/Heimdal.pm b/perl/Wallet/Kadmin/Heimdal.pm index b619ba6..893be65 100644 --- a/perl/Wallet/Kadmin/Heimdal.pm +++ b/perl/Wallet/Kadmin/Heimdal.pm @@ -57,12 +57,13 @@ sub kadmin_client { and defined ($Wallet::Config::KEYTAB_REALM)) { die "keytab object implementation not configured\n"; } - my $server = $Wallet::Config::KEYTAB_HOST || 'localhost'; my @options = (RaiseError => 1, - Server => $server, Principal => $Wallet::Config::KEYTAB_PRINCIPAL, Realm => $Wallet::Config::KEYTAB_REALM, Keytab => $Wallet::Config::KEYTAB_FILE); + if ($Wallet::Config::KEYTAB_HOST) { + push (@options, Server => $Wallet::Config::KEYTAB_HOST); + } my $client = Heimdal::Kadm5::Client->new (@options); return $client; } -- cgit v1.2.3