From: John Kohl Date: Tue, 8 Jan 1991 14:32:16 +0000 (+0000) Subject: l X-Git-Tag: krb5-1.0-alpha4~350 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ec02a06c390e283104d7966151052d9925461eb7;p=krb5.git l git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1621 dc483132-0cff-0310-8789-dd5450dbe970 --- 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; +}