From 2edcc96c11c1f5c9294f1730973e7582b3a3acbd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Jul 2002 13:27:42 +0000 Subject: a couple more minor tweaks. This now allows us to operate in ADS mode without any 'realm =' or 'ads server =' options at all, as long as DNS is working right. (This used to be commit d3fecdd04241ed7b9248e52415693cd54a1faecf) --- source3/libads/ads_struct.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/libads') diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index 638dc0b22e..0be79673a0 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -148,6 +148,12 @@ ADS_STRUCT *ads_init(const char *realm, SAFE_FREE(ads->realm); } } + + if (!ads->realm && strchr_m(ads->workgroup, '.')) { + /* the smb.conf has specified the realm in 'workgroup =' */ + ads->realm = strdup(ads->workgroup); + } + if (!ads->bind_path && ads->realm) { ads->bind_path = ads_build_dn(ads->realm); } -- cgit