From 83b5139ce2e6bac445920d71bba1acd0cf92bb21 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Wed, 2 Feb 2005 07:29:14 +0000 Subject: [PATCH] use cc_retrieve_cred if present rather than enumerating ccache git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14528 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/krb5/cache.c b/lib/krb5/cache.c index 72d8c2ab7..801e92b31 100644 --- a/lib/krb5/cache.c +++ b/lib/krb5/cache.c @@ -402,6 +402,12 @@ krb5_cc_retrieve_cred(krb5_context context, { krb5_error_code ret; krb5_cc_cursor cursor; + + if (id->ops->retrieve != NULL) { + return id->ops->retrieve(context, id, whichfields, + mcreds, creds); + } + krb5_cc_start_seq_get(context, id, &cursor); while((ret = krb5_cc_next_cred(context, id, &cursor, creds)) == 0){ if(krb5_compare_creds(context, whichfields, mcreds, creds)){ -- 2.11.4.GIT