summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-02-09 13:14:41 -0800
committerRuss Allbery <rra@stanford.edu>2010-02-09 13:14:41 -0800
commitb037770195ef0bd98d6655a65873b25d90e36032 (patch)
treeee8d0977ef2f65072f0583d0838e61b8feb55e7d /perl
parent59455fd5e6a47a66a2a84779f42928fd66ec9747 (diff)
Document and make case-insensitive KEYTAB_KRBTYPE
KEYTAB_KRBTYPE wasn't documented in Wallet::Config. Add it and the variable declaration. Also document the new mandatory setting in NEWS and add the Heimdal::Kadm5 requirement to README. Remove some of the language in README that implies that only MIT Kerberos is supported. Make the setting case-insensitive and improve the error message from Wallet::Kadmin if it isn't set.
Diffstat (limited to 'perl')
-rw-r--r--perl/Wallet/Config.pm9
-rw-r--r--perl/Wallet/Kadmin.pm9
2 files changed, 14 insertions, 4 deletions
diff --git a/perl/Wallet/Config.pm b/perl/Wallet/Config.pm
index 7198c07..ae8cf9c 100644
--- a/perl/Wallet/Config.pm
+++ b/perl/Wallet/Config.pm
@@ -250,6 +250,15 @@ default PATH.
our $KEYTAB_KADMIN = 'kadmin';
+=item KEYTAB_KRBTYPE
+
+The Kerberos KDC implementation type, either C<Heimdal> or C<MIT>
+(case-insensitive). KEYTAB_KRBTYPE must be set to use keytab objects.
+
+=cut
+
+our $KEYTAB_KRBTYPE;
+
=item KEYTAB_PRINCIPAL
The principal whose key is stored in KEYTAB_FILE. The wallet will
diff --git a/perl/Wallet/Kadmin.pm b/perl/Wallet/Kadmin.pm
index b3a630e..5c01ee3 100644
--- a/perl/Wallet/Kadmin.pm
+++ b/perl/Wallet/Kadmin.pm
@@ -1,7 +1,7 @@
# Wallet::Kadmin -- Kadmin module wrapper for the wallet.
#
# Written by Jon Robertson <jonrober@stanford.edu>
-# Copyright 2009 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2009, 2010 Board of Trustees, Leland Stanford Jr. University
#
# See LICENSE for licensing terms.
@@ -34,14 +34,15 @@ sub new {
my ($kadmin);
if (not $Wallet::Config::KEYTAB_KRBTYPE) {
die "keytab object implementation not configured\n";
- } elsif ($Wallet::Config::KEYTAB_KRBTYPE eq 'MIT') {
+ } elsif (lc ($Wallet::Config::KEYTAB_KRBTYPE) eq 'mit') {
require Wallet::Kadmin::MIT;
$kadmin = Wallet::Kadmin::MIT->new;
- } elsif ($Wallet::Config::KEYTAB_KRBTYPE eq 'Heimdal') {
+ } elsif (lc ($Wallet::Config::KEYTAB_KRBTYPE) eq 'heimdal') {
require Wallet::Kadmin::Heimdal;
$kadmin = Wallet::Kadmin::Heimdal->new;
} else {
- die "keytab krb server type not set to a valid value\n";
+ my $type = $Wallet::Config::KEYTAB_KRBTYPE;
+ die "unknown KEYTAB_KRBTYPE setting: $type\n";
}
return $kadmin;