summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-07-30 13:27:42 +0000
committerAndrew Tridgell <tridge@samba.org>2002-07-30 13:27:42 +0000
commit2edcc96c11c1f5c9294f1730973e7582b3a3acbd (patch)
tree1ed731efe49199372d33948790dc816f2e90b89a /source3/libads
parent0bd3a76f673de93dac4fa18a60612bc888c05df4 (diff)
downloadsamba-2edcc96c11c1f5c9294f1730973e7582b3a3acbd.tar.gz
samba-2edcc96c11c1f5c9294f1730973e7582b3a3acbd.tar.bz2
samba-2edcc96c11c1f5c9294f1730973e7582b3a3acbd.zip
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)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ads_struct.c6
1 files changed, 6 insertions, 0 deletions
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);
}