diff options
Diffstat (limited to 'source4/nbt_server/dgram')
-rw-r--r-- | source4/nbt_server/dgram/netlogon.c | 5 |
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); |