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
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);