summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-02-08 19:34:33 -0800
committerRuss Allbery <rra@stanford.edu>2010-02-08 19:34:33 -0800
commitb895ba0ae2baab93badb6d3f59dac14a7443f0b9 (patch)
tree824f0ce71ed58266eb628d70beb7de43880b129d
parentdb131dd8fd9fa2438c2f66b4cf52ce6b26076c1d (diff)
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.
-rw-r--r--perl/Wallet/Kadmin/Heimdal.pm5
1 files 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;
}