summaryrefslogtreecommitdiff
path: root/source3/libads/ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r--source3/libads/ldap.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 92f7f7645a..cf6f9375f8 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -109,12 +109,8 @@ static BOOL ads_find_dc(ADS_STRUCT *ads)
/* realm */
c_realm = ads->server.realm;
- if (!c_realm || !*c_realm) {
- c_realm = lp_realm();
- }
- if ( c_realm )
+ if (c_realm && *c_realm)
got_realm = True;
-
again:
/* we need to try once with the realm name and fallback to the
@@ -122,10 +118,10 @@ again:
if ( !got_realm && !lp_disable_netbios() ) {
c_realm = ads->server.workgroup;
- if (!c_realm || !*c_realm)
- c_realm = lp_workgroup();
- if (!c_realm)
+ if (!c_realm || !*c_realm) {
+ DEBUG(0,("ads_find_dc: no realm or workgroup! Was the structure initialized?\n"));
return False;
+ }
}
pstrcpy( realm, c_realm );