1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:winbindd: improve logic to use CLDAP for a given domain.

As an AC Domain Controller we should try CLDAP for active directory domains.
E.g. FreeIPA domains doesn't provide NBT at all...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Jan  5 19:23:40 CET 2015 on sn-devel-104
This commit is contained in:
Stefan Metzmacher 2014-12-23 09:43:19 +00:00 committed by Günther Deschner
parent 3c99260551
commit 8a2a5986b6

View File

@ -1381,7 +1381,9 @@ static bool dcip_to_name(TALLOC_CTX *mem_ctx,
NTSTATUS status;
const char *dc_name;
fstring nbtname;
#ifdef HAVE_ADS
bool is_ad_domain = false;
#endif
ip_list.ss = *pss;
ip_list.port = 0;
@ -1390,6 +1392,12 @@ static bool dcip_to_name(TALLOC_CTX *mem_ctx,
None of these failures should be considered critical for now */
if ((lp_security() == SEC_ADS) && (domain->alt_name != NULL)) {
is_ad_domain = true;
} else if (lp_server_role() == ROLE_ACTIVE_DIRECTORY_DC) {
is_ad_domain = domain->active_directory;
}
if (is_ad_domain) {
ADS_STRUCT *ads;
ADS_STATUS ads_status;
char addr[INET6_ADDRSTRLEN];