]> 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)
committerTom Yu <tlyu@mit.edu>
Fri, 12 Sep 2014 21:27:06 +0000 (17:27 -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.

(cherry picked from commit 674f7d7abe2d4f8bc3fe791e4347a332e3ccfd41)

ticket: 8012 (new)
version_fixed: 1.12.3
subject: gssapi.dll tries to get initial creds even when some are present
status: resolved

src/lib/gssapi/krb5/acquire_cred.c

index 57edaa3c0ecd7d696d14d8811b95f026054844f8..dd19b43dda704a1cc9a7ff0a58cd40a415820c47 100644 (file)
@@ -443,7 +443,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. */