clean up stuff in credentials, if necessary after a lookup
authorJohn Kohl <jtkohl@mit.edu>
Thu, 18 Oct 1990 16:00:54 +0000 (16:00 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 18 Oct 1990 16:00:54 +0000 (16:00 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1272 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/gc_frm_kdc.c

index 69a55164b494394d8b1a4bc1cd82b7c5f4065135..0c2c31147c4ac2904bf9b03b43209c4717180aa7 100644 (file)
@@ -84,6 +84,7 @@ krb5_get_cred_from_kdc (ccache, cred, tgts)
      * XXX we're sharing some substructure here, which is
      * probably not safe...
      */
+    bzero((char *)&tgtq, sizeof(tgtq));
     tgtq.client = cred->client;
 
     if (retval = krb5_tgtname(krb5_princ_realm(cred->client),
@@ -153,6 +154,7 @@ krb5_get_cred_from_kdc (ccache, cred, tgts)
                goto out;
            }
            /* now get the TGTs */
+           bzero((char *)&tgtq, sizeof(tgtq));
            tgtq.times = tgt.times;
            tgtq.client = tgt.client;
            tgtq.server = *next_server;
@@ -173,8 +175,10 @@ krb5_get_cred_from_kdc (ccache, cred, tgts)
                krb5_free_realm_tree(tgs_list);
                goto out;
            }
-           /* XXX need to clean up stuff pointed to by tgtq? */
-           tgt = tgtq;
+           tgt = ret_tgts[nservers];
+           tgtq.client = 0;
+           tgtq.server = 0;
+           krb5_free_cred_contents(&tgtq);
        }
        krb5_free_realm_tree(tgs_list);
     }