svn commit: samba r19267 - in branches/SAMBA_4_0_RELEASE/source/libnet: .

abartlet at samba.org abartlet at samba.org
Fri Oct 13 13:04:05 GMT 2006


Author: abartlet
Date: 2006-10-13 13:04:05 +0000 (Fri, 13 Oct 2006)
New Revision: 19267

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

Log:
Minimal set of changes to make 'net samdump' work for TP3.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0_RELEASE/source/libnet/libnet_join.c
   branches/SAMBA_4_0_RELEASE/source/libnet/libnet_rpc.c
   branches/SAMBA_4_0_RELEASE/source/libnet/libnet_vampire.c


Changeset:
Modified: branches/SAMBA_4_0_RELEASE/source/libnet/libnet_join.c
===================================================================
--- branches/SAMBA_4_0_RELEASE/source/libnet/libnet_join.c	2006-10-13 13:01:48 UTC (rev 19266)
+++ branches/SAMBA_4_0_RELEASE/source/libnet/libnet_join.c	2006-10-13 13:04:05 UTC (rev 19267)
@@ -461,8 +461,10 @@
 	/* prepare connect to the LSA pipe of PDC */
 	if (r->in.level == LIBNET_JOINDOMAIN_AUTOMATIC) {
 		connect_with_info->in.name    = r->in.domain_name;
+		connect_with_info->in.binding = NULL;
 	} 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_RELEASE/source/libnet/libnet_rpc.c
===================================================================
--- branches/SAMBA_4_0_RELEASE/source/libnet/libnet_rpc.c	2006-10-13 13:01:48 UTC (rev 19266)
+++ branches/SAMBA_4_0_RELEASE/source/libnet/libnet_rpc.c	2006-10-13 13:04:05 UTC (rev 19267)
@@ -255,21 +255,9 @@
 	c->status = libnet_LookupDCs_recv(ctx, c, &s->f);
 	if (!composite_is_ok(c)) return;
 
-	/* decide on preferred address type depending on DC type */
-	switch (s->r.level) {
-	case LIBNET_RPC_CONNECT_PDC:
-		s->connect_name = s->f.out.dcs[0].name;
-		break;
+	/* get the name of the DC from it's reply packet */
+	s->connect_name = s->f.out.dcs[0].name;
 
-	case LIBNET_RPC_CONNECT_DC:
-		s->connect_name = s->f.out.dcs[0].address;
-		break;
-
-	default:
-		/* we shouldn't absolutely get here */
-		composite_error(c, NT_STATUS_INVALID_LEVEL);
-	}
-
 	/* prepare a monitor message and post it */
 	msg.type         = net_lookup_dc;
 	msg.data         = &data;
@@ -282,7 +270,7 @@
 	if (s->monitor_fn) s->monitor_fn(&msg);
 
 	/* ok, pdc has been found so do attempt to rpc connect */
-	s->r2.level	       = s->r.level;
+	s->r2.level	       = LIBNET_RPC_CONNET_SERVER;
 
 	/* this will cause yet another name resolution, but at least
 	 * we pass the right name down the stack now */

Modified: branches/SAMBA_4_0_RELEASE/source/libnet/libnet_vampire.c
===================================================================
--- branches/SAMBA_4_0_RELEASE/source/libnet/libnet_vampire.c	2006-10-13 13:01:48 UTC (rev 19266)
+++ branches/SAMBA_4_0_RELEASE/source/libnet/libnet_vampire.c	2006-10-13 13:04:05 UTC (rev 19267)
@@ -202,9 +202,10 @@
 	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.name    = cli_credentials_get_domain(machine_account);
+		c->in.binding = NULL;
 	}
 	
 	/* prepare connect to the NETLOGON pipe of PDC */



More information about the samba-cvs mailing list