s3:libads/ldap.c: if the client belongs to no site at all any dc is the closest
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Oct 2008 18:38:15 +0000 (19:38 +0100)
committerStefan Metzmacher <metze@samba.org>
Sat, 13 Dec 2008 10:42:36 +0000 (11:42 +0100)
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: G√ľnther Deschner <gd@samba.org>
(cherry picked from commit f86ef9b53a903485deba94febf90dd4e657cc02b)

source3/libads/ldap.c

index 61e04d1e7c42acd618f393c4cbbb8021ddb72cac..c0bb9c7e2df85346b4bbe80eb3e2062cc3d36da9 100644 (file)
@@ -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));