summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-07-23 19:58:01 +0000
committerGerald Carter <jerry@samba.org>2003-07-23 19:58:01 +0000
commit3a00cedc0107730876f5bb7626db31d253f9df8b (patch)
treee690067f6a191b54354e676c8703060e95c6ab18 /source3/libads
parent27d86b0245b029a178368de407ea35d30a13483b (diff)
downloadsamba-3a00cedc0107730876f5bb7626db31d253f9df8b.tar.gz
samba-3a00cedc0107730876f5bb7626db31d253f9df8b.tar.bz2
samba-3a00cedc0107730876f5bb7626db31d253f9df8b.zip
connect to the right realm or domain for trusted AD domains
(This used to be commit 83376671c511be4bb10d3fca8e49e5f6ef792b9c)
Diffstat (limited to 'source3/libads')
-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 );