blob: 74e070b0abda6471444b37a8071e9e4fc0cc4dc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/*
* lib/krb5/rcache/rc_conv.c
*
* This file of the Kerberos V5 software is derived from public-domain code
* contributed by Daniel J. Bernstein, <brnstnd@acf10.nyu.edu>.
*
*/
/*
* 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;
}
|