summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nsswitch/winbindd_cm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c
index 8a11dfbc30..3b7459ab1d 100644
--- a/source3/nsswitch/winbindd_cm.c
+++ b/source3/nsswitch/winbindd_cm.c
@@ -557,6 +557,12 @@ static BOOL get_dcs(TALLOC_CTX *mem_ctx, const struct winbindd_domain *domain,
if (!resolve_name(dcname, &ip, 0x20))
continue;
+ /* Even if we got the dcname, double check the name to use for
+ * the netlogon auth2 */
+
+ if (!name_status_find(domain->name, 0x1c, 0x20, ip, dcname))
+ continue;
+
add_one_dc_unique(mem_ctx, domain->name, dcname, ip,
dcs, num_dcs);
}