From a7f8c26d24b78dc6a0f829cf7b53112e5ddbdeda Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Jan 2004 04:10:28 +0000 Subject: Change our Domain controller lookup routines to more carefully seperate DNS names (realms) from NetBIOS domain names. Until now, we would experience delays as we broadcast lookups for DNS names onto the local network segments. Now if DNS comes back negative, we fall straight back to looking up the short name. Andrew Bartlett (This used to be commit 32397c8b01f1dec7b05140d210bb32f836a80ca6) --- source3/nsswitch/winbindd_util.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source3/nsswitch/winbindd_util.c') diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 1f9537ac25..22192e4582 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -82,7 +82,6 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const DOM_SID *sid) { struct winbindd_domain *domain; - char *contact_name; const char *alternative_name = NULL; /* ignore alt_name if we are not in an AD domain */ @@ -135,12 +134,11 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const sid_copy(&domain->sid, sid); } - /* see if this is a native mode win2k domain (use realm name if possible) */ + /* see if this is a native mode win2k domain */ - contact_name = *domain->alt_name ? domain->alt_name : domain->name; - domain->native_mode = cm_check_for_native_mode_win2k( contact_name ); + domain->native_mode = cm_check_for_native_mode_win2k( domain ); - DEBUG(3,("add_trusted_domain: %s is a %s mode domain\n", contact_name, + DEBUG(3,("add_trusted_domain: %s is a %s mode domain\n", domain->name, domain->native_mode ? "native" : "mixed (or NT4)" )); /* Link to domain list */ @@ -298,7 +296,7 @@ BOOL init_domain_list(void) * * @note Do *not* pass lp_workgroup() to this function. domain_list * may modify it's value, and free that pointer. Instead, our local - * domain may be found by looking at the first entry in domain_list() + * domain may be found by calling find_our_domain(). * directly. * * -- cgit