diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-23 19:58:01 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-23 19:58:01 +0000 |
commit | 83376671c511be4bb10d3fca8e49e5f6ef792b9c (patch) | |
tree | afa4243953a986e8aac618a8a19dc5e2bf29f02d /source/libads/ldap.c | |
parent | 9de53f309ca686abbe970d8d452bb75398214a6d (diff) | |
download | samba-83376671c511be4bb10d3fca8e49e5f6ef792b9c.tar.gz samba-83376671c511be4bb10d3fca8e49e5f6ef792b9c.tar.xz samba-83376671c511be4bb10d3fca8e49e5f6ef792b9c.zip |
connect to the right realm or domain for trusted AD domains
Diffstat (limited to 'source/libads/ldap.c')
-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 ); |