diff options
| author | John Kohl <jtkohl@mit.edu> | 1991-01-08 14:32:16 +0000 |
|---|---|---|
| committer | John Kohl <jtkohl@mit.edu> | 1991-01-08 14:32:16 +0000 |
| commit | ec02a06c390e283104d7966151052d9925461eb7 (patch) | |
| tree | 6d61fdcfe462c8f3e7ba69cae93d9557f52ecea1 /src/lib | |
| parent | 2d16a40826cf8eba37a3b7048ef782d5c49e9d87 (diff) | |
l
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1621 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/rcache/rc_conv.c | 47 |
1 files changed, 47 insertions, 0 deletions
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, <brnstnd@acf10.nyu.edu>. + * + * 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; +} |
