[30939] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.19]: Continue on KRB5_FCC_NOFILE in KCM cache
daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jan 8 12:53:22 2021
Date: Fri, 8 Jan 2021 12:52:56 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-ID: <202101081752.108HquHY016289@drugstore.mit.edu>
To: <cvs-krb5@mit.edu>
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/a1b5cf2429cf33d77a4fd0aa2849b3d3661f6e05
commit a1b5cf2429cf33d77a4fd0aa2849b3d3661f6e05
Author: Greg Hudson <ghudson@mit.edu>
Date: Sat Nov 21 01:41:41 2020 -0500
Continue on KRB5_FCC_NOFILE in KCM cache iteration
Although Heimdal's KCM client only continues after KRB5_CC_END,
Heimdal's and macOS's KCM server returns KRB5_FCC_NOFILE if a cache
uuid no longer exists. Check for both errors during iteration. Also
set ret to 0 when continuing, in case the skipped uuid is the last one
in the list.
(cherry picked from commit f7b3cb8bbe90817f7bfbc545f1e427c16f52a79c)
ticket: 8967
version_fixed: 1.19
src/lib/krb5/ccache/cc_kcm.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/lib/krb5/ccache/cc_kcm.c b/src/lib/krb5/ccache/cc_kcm.c
index a76a285..9093f89 100644
--- a/src/lib/krb5/ccache/cc_kcm.c
+++ b/src/lib/krb5/ccache/cc_kcm.c
@@ -981,8 +981,10 @@ kcm_ptcursor_next(krb5_context context, krb5_cc_ptcursor cursor,
k5_buf_add_len(&req.reqbuf, id, KCM_UUID_LEN);
ret = kcmio_call(context, data->io, &req);
/* Continue if the cache has been deleted. */
- if (ret == KRB5_CC_END)
+ if (ret == KRB5_CC_END || ret == KRB5_FCC_NOFILE) {
+ ret = 0;
continue;
+ }
if (ret)
goto cleanup;
ret = kcmreq_get_name(&req, &name);
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5