From b756a048a181f266a22d1bcf043e10369d39cd78 Mon Sep 17 00:00:00 2001 From: Justin Anderson Date: Tue, 23 Sep 2008 19:40:52 +0000 Subject: [PATCH] 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 --- src/kim/lib/kim_ccache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.26.2