Subject: | get_principals returns single/last entry instead of all matching entries |
Date: | Fri, 1 Feb 2013 11:42:57 +0000 |
To: | "bug-Authen-Krb5-Admin [...] rt.cpan.org" <bug-Authen-Krb5-Admin [...] rt.cpan.org> |
From: | Abhishek Amarnath Ubale <abubale [...] linkedin.com> |
Hi,
Im using Authen::Krb5::Admin to connect to our KDC and list all principals but there seems to be a bug in get_principals function which always returns the a single last matching entry instead of all matching entries. Here is my code snippet:
Show quoted text
_________________________________
#!/bin/perl -w
use Authen::Krb5;
use Authen::Krb5::Admin qw(:constants);
my @names;
Authen::Krb5::init_context;
Authen::Krb5::init_ets;
my $kadm5 = Authen::Krb5::Admin->init_with_password($ENV{'krb_admin'}, $ENV{'krb_password'}) || die("Unable to init");
@names = $kadm5->get_principals() || die("Unable to get principals: Authen::Krb5::Admin::error");
print "@names\n";
________________________________
Thanks
Abhishek