svn commit: samba r18433 - in branches/SAMBA_4_0/source/nbt_server/dgram: .

abartlet at samba.org abartlet at samba.org
Tue Sep 12 22:03:24 GMT 2006


Author: abartlet
Date: 2006-09-12 22:03:24 +0000 (Tue, 12 Sep 2006)
New Revision: 18433

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

Log:
Make sure to search below the partitions baseDN for the netbios name.

I think we should have a helper function for this search, we do it too
often...

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c


Changeset:
Modified: branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c	2006-09-12 18:45:05 UTC (rev 18432)
+++ branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c	2006-09-12 22:03:24 UTC (rev 18433)
@@ -45,6 +45,7 @@
 	const char *ref_attrs[] = {"nETBIOSName", NULL};
 	struct ldb_message **ref_res;
 	struct ldb_context *samctx;
+	const struct ldb_dn *partitions_basedn;
 	int ret;
 
 	/* only answer getdc requests on the PDC or LOGON names */
@@ -58,7 +59,9 @@
 		return;
 	}
 
-	ret = gendb_search(samctx, samctx, NULL, &ref_res, ref_attrs,
+	partitions_basedn = samdb_partitions_dn(sam_ctx, mem_ctx);
+
+	ret = gendb_search(samctx, samctx, partitions_basedn, &ref_res, ref_attrs,
 			   "(&(&(nETBIOSName=%s)(objectclass=crossRef))(ncName=*))", 
 			   name->name);
 	



More information about the samba-cvs mailing list