From ec02a06c390e283104d7966151052d9925461eb7 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Tue, 8 Jan 1991 14:32:16 +0000 Subject: [PATCH] l git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1621 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/rcache/rc_conv.c | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/lib/krb5/rcache/rc_conv.c diff --git a/src/lib/krb5/rcache/rc_conv.c b/src/lib/krb5/rcache/rc_conv.c new file mode 100644 index 000000000..d8ac6fe0c --- /dev/null +++ b/src/lib/krb5/rcache/rc_conv.c @@ -0,0 +1,47 @@ +/* + * $Source$ + * $Author$ + * + * This part of the Kerberos V5 software is derived from public-domain code + * contributed by Daniel J. Bernstein, . + * + * XXX correct notice? + * This portion of the software may be freely distributed; this permission + * shall not be construed to apply to any other portion of the software. + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_rc_conv_c[] = +"$Id$"; +#endif /* !lint & !SABER */ + +/* + * An implementation for the default replay cache type. + */ + +#define FREE(x) ((void) free((char *) (x))) + +#include "rc_base.h" + +/* +Local stuff: + krb5_auth_to_replay(krb5_tkt_authent *auth,krb5_donot_replay *rep) + given auth, take important information and make rep; return -1 if failed +*/ + +krb5_error_code +krb5_auth_to_rep(auth, rep) +krb5_tkt_authent *auth; +krb5_donot_replay *rep; +{ + krb5_error_code retval; + rep->cusec = auth->authenticator->cusec; + rep->ctime = auth->authenticator->ctime; + if (retval = krb5_unparse_name(auth->ticket->server,&rep->server)) + return retval; /* shouldn't happen */ + if (retval = krb5_unparse_name(auth->authenticator->client,&rep->client)) { + FREE(rep->server); + return retval; /* shouldn't happen. */ + } + return 0; +} -- 2.26.2