diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libads/ldap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 568e220c0b..c3d80a09ec 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -69,8 +69,6 @@ char *ads_errstr(int rc) /* find the ldap server from DNS - this won't work till we add a DNS packet parser. Talk about a - lousy resolv interface! */ static char *find_ldap_server(ADS_STRUCT *ads) { @@ -111,7 +109,10 @@ ADS_STRUCT *ads_init(const char *realm, ads->bind_path = ads_build_dn(ads->realm); } if (!ads->ldap_server) { - ads->ldap_server = find_ldap_server(ads); + ads->ldap_server = lp_ads_server(); + if (!ads->ldap_server[0]) { + ads->ldap_server = find_ldap_server(ads); + } } if (!ads->kdc_server) { /* assume its the same as LDAP */ |