svn commit: samba r19261 - in branches/SAMBA_4_0/source/libnet: .

abartlet at samba.org abartlet at samba.org
Fri Oct 13 07:25:52 GMT 2006


Author: abartlet
Date: 2006-10-13 07:25:51 +0000 (Fri, 13 Oct 2006)
New Revision: 19261

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

Log:
Fix use of unitialised variables.  (The binding string is used, if not
NULL).

This showed up in a manual pre-TP3 test of the 'net samdump' code, and
shows the critical need for the windows testing infrustructure on the
build farm.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_join.c
   branches/SAMBA_4_0/source/libnet/libnet_vampire.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_join.c	2006-10-13 05:22:36 UTC (rev 19260)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.c	2006-10-13 07:25:51 UTC (rev 19261)
@@ -460,9 +460,11 @@
 
 	/* prepare connect to the LSA pipe of PDC */
 	if (r->in.level == LIBNET_JOINDOMAIN_AUTOMATIC) {
+		connect_with_info->in.binding = NULL;
 		connect_with_info->in.name    = r->in.domain_name;
 	} else {
 		connect_with_info->in.binding = r->in.binding;
+		connect_with_info->in.name    = NULL;
 	}
 
 	connect_with_info->level              = LIBNET_RPC_CONNECT_DC_INFO;

Modified: branches/SAMBA_4_0/source/libnet/libnet_vampire.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_vampire.c	2006-10-13 05:22:36 UTC (rev 19260)
+++ branches/SAMBA_4_0/source/libnet/libnet_vampire.c	2006-10-13 07:25:51 UTC (rev 19261)
@@ -202,8 +202,9 @@
 	c->level              = LIBNET_RPC_CONNECT_DC_INFO;
 	if (r->in.binding_string) {
 		c->in.binding = r->in.binding_string;
-
+		c->in.name    = NULL;
 	} else {
+		c->in.binding = NULL;
 		c->in.name    = cli_credentials_get_domain(machine_account);
 	}
 	



More information about the samba-cvs mailing list