diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-23 20:10:25 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-23 20:10:25 +0000 |
commit | ae14f8364398f07fc3e7c7861cd39fe528f3fe7a (patch) | |
tree | bbc51cff451fc7f2f7b9ec46c22b0cd1b3163903 | |
parent | e66541d0e1befec5d589890994454dd639ea0665 (diff) | |
download | samba-ae14f8364398f07fc3e7c7861cd39fe528f3fe7a.tar.gz samba-ae14f8364398f07fc3e7c7861cd39fe528f3fe7a.tar.xz samba-ae14f8364398f07fc3e7c7861cd39fe528f3fe7a.zip |
connect to the right realm or domain for trusted AD domains
-rw-r--r-- | source/libads/ldap.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/libads/ldap.c b/source/libads/ldap.c index 92f7f7645ac..cf6f9375f88 100644 --- a/source/libads/ldap.c +++ b/source/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 ); |