From 280d06f8b5734555eb3cb8423d7f9ad1bdc83792 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 27 Apr 2010 15:02:29 +1000 Subject: [PATCH] s4-libnet: cope with an empty client site name from CLDAP We fall back to the server site name in a vampire Pair-Programmed-With: Andrew Bartlett --- source4/libnet/libnet_become_dc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index 6457266407a..74242c02d4e 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -825,6 +825,11 @@ static void becomeDC_recv_cldap(struct tevent_req *req) DEBUG(0,("CLDAP response: forest=%s dns=%s netbios=%s server_site=%s client_site=%s\n", s->forest.dns_name, s->domain.dns_name, s->domain.netbios_name, s->source_dsa.site_name, s->dest_dsa.site_name)); + if (!s->dest_dsa.site_name || strcmp(s->dest_dsa.site_name, "") == 0) { + DEBUG(0,("Got empty client site - using server site name %s\n", + s->source_dsa.site_name)); + s->dest_dsa.site_name = s->source_dsa.site_name; + } becomeDC_connect_ldap1(s); } -- 2.11.4.GIT