From: Greg Hudson Date: Mon, 8 Aug 2011 18:27:15 +0000 (+0000) Subject: Fix accidental KDC use of replay cache X-Git-Tag: krb5-1.10-alpha1~299 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d7618afafe8c712d09da2bc2f9841ffd7fc1d0c7;p=krb5.git Fix accidental KDC use of replay cache r24464 (ticket #6804) intended to remove the KDC replay cache by eliminating all of the USE_RCACHE code, but it had the unintended side effect of causing krb5_rd_req_decoded to use the default server rcache. Using this cache is much less efficient because it is opened and re-read for each request. Set appropriate flags on the auth context to disable replay cache use for TGS requests altogether. ticket: 6941 target_version: 1.9.2 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25076 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index fbf963e42..bfc48c5d0 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -245,6 +245,10 @@ kdc_process_tgs_req(krb5_kdc_req *request, const krb5_fulladdr *from, if ((retval = krb5_auth_con_init(kdc_context, &auth_context))) goto cleanup; + /* Don't use a replay cache. */ + if ((retval = krb5_auth_con_setflags(kdc_context, auth_context, 0))) + goto cleanup; + if ((retval = krb5_auth_con_setaddrs(kdc_context, auth_context, NULL, from->address)) ) goto cleanup_auth_context;