From: Stefan Metzmacher Date: Mon, 27 Oct 2008 18:38:15 +0000 (+0100) Subject: s3:libads/ldap.c: if the client belongs to no site at all any dc is the closest X-Git-Tag: samba-4.0.0alpha6~479^2~3^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8040d59659e58c5cb92c1107a7ff012eff12729;p=thirdparty%2Fsamba.git s3:libads/ldap.c: if the client belongs to no site at all any dc is the closest metze Signed-off-by: Stefan Metzmacher Signed-off-by: Günther Deschner (cherry picked from commit f86ef9b53a903485deba94febf90dd4e657cc02b) --- diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 61e04d1e7c4..c0bb9c7e2df 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -162,6 +162,11 @@ bool ads_closest_dc(ADS_STRUCT *ads) return True; } + if (ads->config.client_site_name == NULL) { + DEBUG(10,("ads_closest_dc: client belongs to no site\n")); + return True; + } + DEBUG(10,("ads_closest_dc: %s is not the closest DC\n", ads->config.ldap_server_name));