summaryrefslogtreecommitdiff
path: root/source4/nbt_server/dgram
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-09-12 22:03:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:28 -0500
commit7d2a8201570af5d9358421e67ec1791574a979ea (patch)
treef51ee24d18c24ee82b2d60dd32bb718f52f63e2a /source4/nbt_server/dgram
parentdaff791c273cb3970add7abdb586745bb816db2a (diff)
downloadsamba-7d2a8201570af5d9358421e67ec1791574a979ea.tar.gz
samba-7d2a8201570af5d9358421e67ec1791574a979ea.tar.bz2
samba-7d2a8201570af5d9358421e67ec1791574a979ea.zip
r18433: 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 (This used to be commit 09327baa0ded3a98398b266c960f827b29021d91)
Diffstat (limited to 'source4/nbt_server/dgram')
-rw-r--r--source4/nbt_server/dgram/netlogon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index e4cc4c966b..9f4803c704 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -45,6 +45,7 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
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 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
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);