krb5 commit [krb5-1.12]: Set an error message when keyring get_princ fails
Tom Yu
tlyu at MIT.EDU
Wed Jan 8 22:30:35 EST 2014
https://github.com/krb5/krb5/commit/5571685ec73f95cc8d490986f7b87fccd34897f5
commit 5571685ec73f95cc8d490986f7b87fccd34897f5
Author: Nalin Dahyabhai <nalin at dahyabhai.net>
Date: Thu Dec 5 13:54:09 2013 -0500
Set an error message when keyring get_princ fails
When attempting to use a keyring cache that doesn't exist, set an error
message when we fail to read a principal name, as we do when we return
the same error code when using a file ccache.
[ghudson: removed unnecessary check for d->name nullity.]
(cherry picked from commit c25fc42e8eac7350209df61e4a7b9960d17755ca)
ticket: 7809
src/lib/krb5/ccache/cc_keyring.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/lib/krb5/ccache/cc_keyring.c b/src/lib/krb5/ccache/cc_keyring.c
index 1a0f1df..a02cdf0 100644
--- a/src/lib/krb5/ccache/cc_keyring.c
+++ b/src/lib/krb5/ccache/cc_keyring.c
@@ -1707,6 +1707,9 @@ krb5_krcc_retrieve_principal(krb5_context context, krb5_ccache id,
if (!d->cache_id || !d->princ_id) {
princ = 0L;
kret = KRB5_FCC_NOFILE;
+ krb5_set_error_message(context, kret,
+ _("Credentials cache keyring '%s' not found"),
+ d->name);
goto errout;
}
More information about the cvs-krb5
mailing list