klist 1.10-beta1: returns 0 when no cache file found

Tom Yu tlyu at MIT.EDU
Wed Jun 27 11:15:51 EDT 2012


Nathan Warren <nwarren at nazarene.org> writes:

> Consider this shell script:
>
> 	klist -V
> 	if ! klist; then
> 		echo "klist returned false";
> 	else
> 		echo "klist returned true";
> 	fi
>
> When I run this script on one of my linux boxes I get this (as expected):
>
> 	Kerberos 5 version 1.8.3
> 	klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_1000)
> 	klist returned false
>
> And on a different one:
>
> 	Kerberos 5 version 1.10-beta1
> 	klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_1000)
> 	klist returned false
>
>
> I am using this logic to determine if I already have a ticket, and if not, to get one using kinit. This new (bugged?) behavior doesn't seem consistent. If I authenticate using kinit, then use kdestroy, this script will find the cache file, with no tickets, and output "klist returned false" as expected.

The output you quote above appears to be the same (except for version
numbers) for both versions of klist, unless I'm missing something.
What differences are you seeing?


More information about the Kerberos mailing list