]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Try to scan_ccache() after leash picks a cache
authorBen Kaduk <kaduk@mit.edu>
Thu, 21 Aug 2014 16:48:39 +0000 (12:48 -0400)
committerBen Kaduk <kaduk@mit.edu>
Tue, 9 Sep 2014 19:01:12 +0000 (15:01 -0400)
We need to call scan_ccache() in order to notice that there
are credentials and read their expire time.

The call to scan_ccache() in the Leash case was inadvertently
removed as part of commit 8651f3339ccc5a623172a8edfb9cf522883acacd.

ticket: 7998 (new)
tags: pullup
target_version: 1.12.3
subject: gssapi.dll tries to get initial creds even when some are present

src/lib/gssapi/krb5/acquire_cred.c

index f952f64cc231ba1b23356be40aae96dfdb6e443b..eec6f2a4b1637d4d9b8a69f7c0d85c6ecf8d3640 100644 (file)
@@ -464,7 +464,8 @@ get_cache_for_name(krb5_context context, krb5_gss_cred_id_rec *cred)
 
     assert(cred->name != NULL && cred->ccache == NULL);
 #ifdef USE_LEASH
-    return get_ccache_leash(context, cred->name->princ, &cred->ccache);
+    code = get_ccache_leash(context, cred->name->princ, &cred->ccache);
+    return code ? code : scan_ccache(context, cred);
 #else
     /* Check first whether we can acquire tickets, to avoid overwriting the
      * extended error message from krb5_cc_cache_match. */