From: Ken Raeburn Date: Wed, 28 Nov 1990 08:43:43 +0000 (+0000) Subject: Zero out credentials structure correctly; handle reading of authdata X-Git-Tag: krb5-1.0-alpha3~89 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9230ec88707624e34aa9d6fc7c1b0cdf660b45fe;p=krb5.git Zero out credentials structure correctly; handle reading of authdata git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1504 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/stdio/scc_nseq.c b/src/lib/krb5/ccache/stdio/scc_nseq.c index ce8bf5092..2bdda2fab 100644 --- a/src/lib/krb5/ccache/stdio/scc_nseq.c +++ b/src/lib/krb5/ccache/stdio/scc_nseq.c @@ -51,7 +51,15 @@ krb5_scc_next_cred(id, cursor, creds) krb5_error_code kret; krb5_scc_cursor *fcursor; - bzero((char *)creds, sizeof(*creds)); +#define Z(field) creds->field = 0 + Z (client); + Z (server); + Z (keyblock.contents); + Z (authdata); + Z (ticket.data); + Z (second_ticket.data); + Z (addresses); +#undef Z MAYBE_OPEN (id, "r"); @@ -77,6 +85,8 @@ krb5_scc_next_cred(id, cursor, creds) TCHECK(kret); kret = krb5_scc_read_addrs(id, &creds->addresses); TCHECK(kret); + kret = krb5_scc_read_authdata (id, &creds->authdata); + TCHECK (kret); kret = krb5_scc_read_data(id, &creds->ticket); TCHECK(kret); kret = krb5_scc_read_data(id, &creds->second_ticket); @@ -99,6 +109,8 @@ lose: xfree(creds->second_ticket.data); if (creds->addresses) krb5_free_address(creds->addresses); + if (creds->authdata) + krb5_free_authdata (creds->authdata); } MAYBE_CLOSE (id, kret); return kret;