diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-11-25 00:08:48 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-11-25 00:08:48 +0000 |
commit | f2e969268d965338338be09d261bde31c5c2ff8b (patch) | |
tree | cba62999202e936f32e1097749d6a984bb25e797 | |
parent | ad2974cd05b4d08c8b92f505bf95aa8e8533235f (diff) | |
download | samba-f2e969268d965338338be09d261bde31c5c2ff8b.tar.gz samba-f2e969268d965338338be09d261bde31c5c2ff8b.tar.bz2 samba-f2e969268d965338338be09d261bde31c5c2ff8b.zip |
better auto-selection of realm and ldap server
(This used to be commit 69d256af4612f5c1277202eb8a7ef37eb6bb55f4)
-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 */ |