Heimdal's version of klist shows dates in a different format that
the regex parsing of klist output didn't understand. Adjust for
the current formatting while hopefully not breaking understanding
of previous versions.
return unless $? == 0;
my ($default) = ($output =~ /^(?:Default p|\s*P)rincipal: (\S+)/m);
my ($service) = ($output =~ / Service principal\n(?:\S+\s+){4}(\S+)/);
+ unless ($service) {
+ ($service) = ($output =~ / Principal\n(?:\S+\s+){9}(\S+)/);
+ }
unless ($service) {
($service) = ($output =~ / Principal\n(?:\S+\s+){7}(\S+)/);
}
my ($flags) = ($output =~ /\sFlags: (\S+)/);
+ unless ($flags) {
+ ($flags) = ($output =~ / Flags\s+Principal\n(?:\S+\s+){8}(\S+)/);
+ }
unless ($flags) {
($flags) = ($output =~ / Flags\s+Principal\n(?:\S+\s+){6}(\S+)/);
}