diff options
Diffstat (limited to 'perl')
| -rw-r--r-- | perl/Wallet/Config.pm | 9 | ||||
| -rw-r--r-- | perl/Wallet/Kadmin.pm | 9 | 
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; | 
