From: John Kohl Date: Tue, 8 Jan 1991 14:31:51 +0000 (+0000) Subject: modify replay cache code to generalize it X-Git-Tag: krb5-1.0-alpha4~351 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d16a40826cf8eba37a3b7048ef782d5c49e9d87;p=krb5.git modify replay cache code to generalize it git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1620 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c index 0028ca7dd..4d8c01e13 100644 --- a/src/lib/krb5/krb/rd_req_dec.c +++ b/src/lib/krb5/krb/rd_req_dec.c @@ -155,10 +155,23 @@ krb5_tkt_authent *tktauthent; /* only check rcache if sender has provided one---some services may not be able to use replay caches (such as datagram servers) */ - if (rcache && (retval = krb5_rc_store(rcache, tktauthent))) { - tktauthent->ticket = 0; - clean_authenticator(); - return retval; + if (rcache) { + krb5_donot_replay rep; + + if (retval = krb5_auth_to_rep(tktauthent, &rep)) { + tktauthent->ticket = 0; + clean_authenticator(); + return retval; + } + if (retval = krb5_rc_store(rcache, &rep)) { + xfree(rep.server); + xfree(rep.client); + tktauthent->ticket = 0; + clean_authenticator(); + return retval; + } + xfree(rep.server); + xfree(rep.client); } tktauthent->ticket = 0;