summaryrefslogtreecommitdiff
path: root/source3/libads/ads_struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ads_struct.c')
-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);
}