summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-25 07:32:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:45 -0500
commitb21b119cbcff175453173d7061e3be3888dc8ec3 (patch)
treea83ace4202a076adc4cdbcf772c4da2ba82fdcf5 /source4/nbt_server
parent0fd98079425cff37c45be824ffa2695458ff12f3 (diff)
downloadsamba-b21b119cbcff175453173d7061e3be3888dc8ec3.tar.gz
samba-b21b119cbcff175453173d7061e3be3888dc8ec3.tar.bz2
samba-b21b119cbcff175453173d7061e3be3888dc8ec3.zip
r17824: add a wrapper for the common partitions_basedn calculation
(This used to be commit 09007b0907662a0d147e8eb21d5bdfc90dbffefc)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/dgram/netlogon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index 2a600120d1..e4cc4c966b 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -109,7 +109,7 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
int ret;
const char **services = lp_server_services();
const char *my_ip = reply_iface->ip_address;
- const struct ldb_dn *partitions_basedn = ldb_dn_string_compose(packet, samdb_base_dn(packet), "CN=Partitions,CN=Configuration");
+ const struct ldb_dn *partitions_basedn;
if (!my_ip) {
DEBUG(0, ("Could not obtain own IP address for datagram socket\n"));
return;
@@ -126,6 +126,8 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
return;
}
+ partitions_basedn = samdb_partitions_dn(samctx, samctx);
+
ret = gendb_search(samctx, samctx, partitions_basedn, &ref_res, ref_attrs,
"(&(&(nETBIOSName=%s)(objectclass=crossRef))(ncName=*))",
name->name);