diff --git a/source/libads/ldap.c b/source/libads/ldap.c index 424f975a884..a93bd568823 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -156,6 +156,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));