krb5 commit: Set error message on KCM get_princ failure
Greg Hudson
ghudson at mit.edu
Sun Apr 29 00:34:30 EDT 2018
https://github.com/krb5/krb5/commit/58f60f3df7a625ccdcce23dfadd52dc335fd8da7
commit 58f60f3df7a625ccdcce23dfadd52dc335fd8da7
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
ticket: 8675 (new)
tags: pullup
target_version: 1.16-next
target_version: 1.15-next
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