summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-27 15:02:29 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-27 15:24:44 +1000
commit280d06f8b5734555eb3cb8423d7f9ad1bdc83792 (patch)
treed5da4dfb7991d2aa23f1d657ce8d838b3fbdfeee /source4
parente88a54a87e185b44e2d216bd853e6a87bf950be6 (diff)
downloadsamba-280d06f8b5734555eb3cb8423d7f9ad1bdc83792.tar.gz
samba-280d06f8b5734555eb3cb8423d7f9ad1bdc83792.tar.bz2
samba-280d06f8b5734555eb3cb8423d7f9ad1bdc83792.zip
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 <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_become_dc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 6457266407..74242c02d4 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);
}