USE_KADM5_API_VERSION
);
-$VERSION = '0.04';
+$VERSION = '0.05';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
my $princ = shift;
my $mask = shift;
- $mask = (Heimdal::Kadm5::KADM5_PRINCIPAL_NORMAL_MASK()|Heimdal::Kadm5::KADM5_KEY_DATA()) unless $mask;
+ $mask = (Heimdal::Kadm5::KADM5_PRINCIPAL_NORMAL_MASK()|Heimdal::Kadm5::KADM5_KEY_DATA()|Heimdal::Kadm5::KADM5_TL_DATA()) unless $mask;
$self->handle->c_get_principal($princ,$mask);
}
Note that this data may not be present depending on how the principal
was obtained.
+my $password = $principal->getPassword();
+
+getPassword returns the password if its saved in the Kerberos database.
+Not the that principal object need to fetched with the bit KADM5_TL_DATA
+set in the mask.
+
=head1 Exported constants
OUTPUT:
RETVAL
+SV *
+getPassword(spp)
+ sprincipal_t *spp
+ CODE:
+ {
+#ifdef KRB5_TL_PASSWORD
+ krb5_tl_data *tl = spp->principal.tl_data;
+
+ while (tl != NULL)
+ {
+ if (tl->tl_data_type == KRB5_TL_PASSWORD)
+ break;
+ tl = tl->tl_data_next;
+ }
+
+ if (tl)
+ RETVAL = newSVpv(tl->tl_data_contents,0);
+ else
+#endif
+ RETVAL = &PL_sv_undef;
+ }
+ OUTPUT:
+ RETVAL
+
+
MODULE = Heimdal::Kadm5 PACKAGE = Heimdal::Kadm5
double