]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Per discussion with Greg and Luke, hold an alias to the out_ccache.
authorSam Hartman <hartmans@mit.edu>
Wed, 23 Dec 2009 21:10:49 +0000 (21:10 +0000)
committerSam Hartman <hartmans@mit.edu>
Wed, 23 Dec 2009 21:10:49 +0000 (21:10 +0000)
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

src/lib/krb5/krb/gic_opt.c

index f4cfd9220386cfc447b1c4d8b3177f3456c804ae..b04252bb40a0d5d3ccb936dd9275380cd3e267ca 100644 (file)
@@ -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