Good day,

I discovered some strange behavior with klist. Perhaps this was meant to be, 
which is why I am asking here before reporting to the bug list.

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.

Of course there are ways I can edit my scripts to achieve the same thing, but 
if this is going to be changed back, I would rather fix krb5 than my scripts. 

I am a little out of my league among many of you, so be gentle if I'm somehow 
off base here. 

Nate

________________________________________________
Kerberos mailing list           [email protected]
https://mailman.mit.edu/mailman/listinfo/kerberos

Reply via email to