krb5 commit [krb5-1.16]: Set error message on KCM get_princ failure
Greg Hudson
ghudson at mit.edu
Wed May 2 01:25:46 EDT 2018
https://github.com/krb5/krb5/commit/300d87755fc988c6228a328f20a8078efc069866
commit 300d87755fc988c6228a328f20a8078efc069866
Author: Robbie Harwood <rharwood at redhat.com>
Date: Fri Apr 27 13:51:39 2018 -0400
Set error message on KCM get_princ failure
This matches the expected behavior from other ccache types. Most
notably, the KEYRING equivalent was added in
c25fc42e8eac7350209df61e4a7b9960d17755ca
(cherry picked from commit 58f60f3df7a625ccdcce23dfadd52dc335fd8da7)
ticket: 8675
version_fixed: 1.16.1
src/lib/krb5/ccache/cc_kcm.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/lib/krb5/ccache/cc_kcm.c b/src/lib/krb5/ccache/cc_kcm.c
index 0d38b18..a777f27 100644
--- a/src/lib/krb5/ccache/cc_kcm.c
+++ b/src/lib/krb5/ccache/cc_kcm.c
@@ -721,12 +721,18 @@ kcm_get_princ(krb5_context context, krb5_ccache cache,
{
krb5_error_code ret;
struct kcmreq req;
+ struct kcm_cache_data *data = cache->data;
kcmreq_init(&req, KCM_OP_GET_PRINCIPAL, cache);
ret = cache_call(context, cache, &req, FALSE);
/* Heimdal KCM can respond with code 0 and no principal. */
if (!ret && req.reply.len == 0)
ret = KRB5_FCC_NOFILE;
+ if (ret == KRB5_FCC_NOFILE) {
+ k5_setmsg(context, ret, _("Credentials cache 'KCM:%s' not found"),
+ data->residual);
+ }
+
if (!ret)
ret = k5_unmarshal_princ(req.reply.ptr, req.reply.len, 4, princ_out);
kcmreq_free(&req);
More information about the cvs-krb5
mailing list