diff options
author | Ezra Peisach <epeisach@mit.edu> | 1995-11-09 14:39:34 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 1995-11-09 14:39:34 +0000 |
commit | 8afd18519f744a236cca8cf98852bd47b304f068 (patch) | |
tree | b33bf9ecd99e3695f6c2d81d3bd2fad230279733 /src/appl/simple/client/sim_client.c | |
parent | 9cb1a31d926cbac8e53395651e58d4ea7c43cc43 (diff) | |
download | krb5-8afd18519f744a236cca8cf98852bd47b304f068.zip krb5-8afd18519f744a236cca8cf98852bd47b304f068.tar.gz krb5-8afd18519f744a236cca8cf98852bd47b304f068.tar.bz2 |
sim_client.c (main): Use krb5_get_server_rcache instead of duplicating
code. Remove use of krb5_clockskew variable.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7074 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/simple/client/sim_client.c')
-rw-r--r-- | src/appl/simple/client/sim_client.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/appl/simple/client/sim_client.c b/src/appl/simple/client/sim_client.c index b0df5ca..ca966c1 100644 --- a/src/appl/simple/client/sim_client.c +++ b/src/appl/simple/client/sim_client.c @@ -89,7 +89,7 @@ main(argc, argv) krb5_ccache ccdef; krb5_address addr, *portlocal_addr; krb5_rcache rcache; - extern krb5_deltat krb5_clockskew; + krb5_data rcache_name; krb5_context context; krb5_auth_context auth_context = NULL; @@ -277,26 +277,12 @@ main(argc, argv) com_err(progname, retval, "while generating replay cache name"); exit(1); } - if (!(rcache = (krb5_rcache)malloc(sizeof(*rcache)))) { - com_err(progname, ENOMEM, "while allocating replay cache"); - exit(1); - } - if ((retval = krb5_rc_resolve_type(context, &rcache, - krb5_rc_default_type(context)))) { - krb5_xfree(rcache); - com_err(progname, retval, "while resolving replay cache type"); - exit(1); - } - if ((retval = krb5_rc_resolve(context, rcache, cp))) { - krb5_xfree(rcache); - com_err(progname, retval, "while resolving replay cache type"); - exit(1); - } - if ((retval = krb5_rc_recover(context, rcache)) && - (retval = krb5_rc_initialize(context, rcache, krb5_clockskew))) { - com_err(progname, retval, "while initializing replay cache '%s:%s'", - rcache->ops->type, - krb5_rc_get_name(context, rcache)); + + rcache_name.length = strlen(cp); + rcache_name.data = cp; + + if ((retval = krb5_get_server_rcache(context, &rcache_name, &rcache))) { + com_err(progname, retval, "while getting server rcache"); exit(1); } |