svn commit: samba r4333 - in trunk/source/libads: .

jra at samba.org jra at samba.org
Wed Dec 22 22:06:56 GMT 2004


Author: jra
Date: 2004-12-22 22:06:55 +0000 (Wed, 22 Dec 2004)
New Revision: 4333

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4333

Log:
Fix for bugid #2186 - from Buck Huppmann <buckh at pobox.com>
to prevent uninitialized creds being freed.
Jeremy.

Modified:
   trunk/source/libads/kerberos.c


Changeset:
Modified: trunk/source/libads/kerberos.c
===================================================================
--- trunk/source/libads/kerberos.c	2004-12-22 21:20:12 UTC (rev 4332)
+++ trunk/source/libads/kerberos.c	2004-12-22 22:06:55 UTC (rev 4333)
@@ -320,6 +320,8 @@
 	krb5_auth_context auth_context = NULL;
 	krb5_error_code err = 0;
 
+	ZERO_STRUCT(creds);
+
 	asprintf(&machine_account, "%s$@%s", global_myname(), lp_realm());
 	if (machine_account == NULL) {
 		goto out;
@@ -340,7 +342,6 @@
 	   ticket to ourselves. */
 
 	/* Set up the enctype and client and server principal fields for krb5_get_credentials. */
-	memset(&creds, '\0', sizeof(creds));
 	kerberos_set_creds_enctype(&creds, enctype);
 
 	if ((err = krb5_cc_get_principal(ctx, ccache, &creds.client))) {



More information about the samba-cvs mailing list