krb5 commit: Set an error message when keyring get_princ fails

Greg Hudson ghudson at MIT.EDU
Sat Dec 21 00:05:37 EST 2013


https://github.com/krb5/krb5/commit/c25fc42e8eac7350209df61e4a7b9960d17755ca
commit c25fc42e8eac7350209df61e4a7b9960d17755ca
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.]
    
    ticket: 7809
    target_version: 1.12.1
    tags: pullup

 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