The authdata field of the credential wasn't being copied. Fixed
authorTheodore Tso <tytso@mit.edu>
Fri, 26 Feb 1993 20:56:22 +0000 (20:56 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 26 Feb 1993 20:56:22 +0000 (20:56 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2509 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/copy_creds.c

index 12591cdb6a11de2c4c5817d1ec231bccaf614b12..c109ec9a89331fa0fc047f10405dd4781211e8eb 100644 (file)
@@ -76,9 +76,15 @@ krb5_creds **outcred;
     tempcred->second_ticket = *scratch;
     xfree(scratch);
 
+    retval = krb5_copy_authdata(incred->authdata,&tempcred->authdata);
+    if (retval)
+        goto clearticket;
+
     *outcred = tempcred;
     return 0;
 
+ clearticket:    
+    memset(tempcred->ticket.data,0,tempcred->ticket.length);
  cleanticket:
     free(tempcred->ticket.data);
  cleanaddrs: