From: Justin Anderson Date: Tue, 23 Sep 2008 19:40:52 +0000 (+0000) Subject: kim_ccache_get_display_name was calling kim_ccache_create_resolve_name with its param... X-Git-Tag: krb5-1.7-alpha1~425 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b756a048a181f266a22d1bcf043e10369d39cd78;p=krb5.git kim_ccache_get_display_name was calling kim_ccache_create_resolve_name with its parameters in the wrong order kim_ccache_iterator_next wasn't handling the end of iteration correctly. ticket:6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20746 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kim/lib/kim_ccache.c b/src/kim/lib/kim_ccache.c index 5831a66ad..dd6bdf77d 100644 --- a/src/kim/lib/kim_ccache.c +++ b/src/kim/lib/kim_ccache.c @@ -87,14 +87,14 @@ kim_error kim_ccache_iterator_next (kim_ccache_iterator in_ccache_iterator, in_ccache_iterator->cursor, &ccache); - if (!terr) { + if (ccache) { err = kim_ccache_create_from_krb5_ccache (out_ccache, in_ccache_iterator->context, ccache); - } else if (terr == KRB5_CC_END) { - *out_ccache = NULL; /* no more ccaches */ - } else { + *out_ccache = NULL; /* no more ccaches */ + } + if (terr && terr != KRB5_CC_END) { err = krb5_error (in_ccache_iterator->context, terr); } } @@ -598,7 +598,7 @@ kim_error kim_ccache_get_display_name (kim_ccache in_ccache, kim_string name = krb5_cc_get_name (in_ccache->context, in_ccache->ccache); - err = kim_ccache_create_resolve_name (out_display_name, type, name); + err = kim_ccache_create_resolve_name (out_display_name, name, type); } return check_error (err);