From 10bcf5947d02eee3ab7ac23bd9523aaf6dc74923 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 17 Sep 2004 07:33:30 +0000 Subject: [PATCH] Fix error code returned for empty sequences and check the error in krb5_lcc_initialize ticket: 2705 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16760 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ChangeLog | 5 +++++ src/lib/krb5/ccache/cc_mslsa.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog index 1d51b69fa..11ac8d80f 100644 --- a/src/lib/krb5/ccache/ChangeLog +++ b/src/lib/krb5/ccache/ChangeLog @@ -1,3 +1,8 @@ +2004-09-17 Jeffrey Altman + * cc_mslsa.c: Fix the error returned when krb5_lcc_start_seq_get() + discovers the cache is empty. Check for the new error in + krb5_lcc_initialize() + 2004-09-10 Jeffrey Altman * cc_mslsa.c: Implement krb5_lcc_initialize() Remove all tickets from the cache which have a client diff --git a/src/lib/krb5/ccache/cc_mslsa.c b/src/lib/krb5/ccache/cc_mslsa.c index f594c895a..f35a59499 100644 --- a/src/lib/krb5/ccache/cc_mslsa.c +++ b/src/lib/krb5/ccache/cc_mslsa.c @@ -1936,8 +1936,11 @@ krb5_lcc_initialize(krb5_context context, krb5_ccache id, krb5_principal princ) return KRB5_FCC_NOFILE; code = krb5_cc_start_seq_get(context, id, &cursor); - if (code) + if (code) { + if (code == KRB5_CC_NOTFOUND) + return KRB5_OK; return code; + } while ( !(code = krb5_cc_next_cred(context, id, &cursor, &cred)) ) { @@ -2041,7 +2044,7 @@ krb5_lcc_start_seq_get(krb5_context context, krb5_ccache id, krb5_cc_cursor *cur if (!GetMSTGT(context, data->LogonHandle, data->PackageId, &lcursor->mstgt, TRUE)) { free(lcursor); *cursor = 0; - return KRB5_FCC_INTERNAL; + return KRB5_CC_NOTFOUND; } #ifdef HAVE_CACHE_INFO_EX2 -- 2.26.2