From: Sam Hartman Date: Wed, 23 Dec 2009 21:10:49 +0000 (+0000) Subject: Per discussion with Greg and Luke, hold an alias to the out_ccache. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc96e5c6f2502cb097b31aebe3d688ca5b21045;p=thirdparty%2Fkrb5.git Per discussion with Greg and Luke, hold an alias to the out_ccache. There is some ambiguity in whether it is appropriate for get_init_creds_opts to hold an alias. However if it is going to copy the ccache, we all believe that a duplicate routine in ccfns.c is preferred. git-svn-id: svn://anonsvn.mit.edu/krb5/branches/anonymous@23509 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/gic_opt.c b/src/lib/krb5/krb/gic_opt.c index f4cfd92203..b04252bb40 100644 --- a/src/lib/krb5/krb/gic_opt.c +++ b/src/lib/krb5/krb/gic_opt.c @@ -149,8 +149,6 @@ krb5int_gic_opte_private_free(krb5_context context, krb5_gic_opt_ext *opte) free_gic_opt_ext_preauth_data(context, opte); if (opte->opt_private->fast_ccache_name) free(opte->opt_private->fast_ccache_name); - if (opte->opt_private->out_ccache) - krb5_cc_close(context, opte->opt_private->out_ccache); free(opte->opt_private); opte->opt_private = NULL; return 0; @@ -501,13 +499,8 @@ krb5_get_init_creds_opt_set_out_ccache(krb5_context context, "krb5_get_init_creds_opt_set_out_ccache"); if (retval) return retval; - if (opte->opt_private->out_ccache) { - krb5_cc_close(context, opte->opt_private->out_ccache); - opte->opt_private->out_ccache = NULL; - } - retval = krb5_cc_resolve(context, krb5_cc_get_name(context, ccache), - &opte->opt_private->out_ccache); - return retval; + opte->opt_private->out_ccache = ccache; + return 0; } krb5_error_code KRB5_CALLCONV