diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 23 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 20 |
2 files changed, 29 insertions, 14 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 45fce21450..f2d264b2b4 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -122,6 +122,12 @@ void set_domain_offline(struct winbindd_domain *domain) TALLOC_FREE(domain->check_online_event); } + if (domain->internal) { + DEBUG(3,("set_domain_offline: domain %s is internal - logic error.\n", + domain->name )); + return; + } + domain->online = False; /* We only add the timeout handler that checks and @@ -166,6 +172,12 @@ static void set_domain_online(struct winbindd_domain *domain) DEBUG(10,("set_domain_online: called for domain %s\n", domain->name )); + if (domain->internal) { + DEBUG(3,("set_domain_offline: domain %s is internal - logic error.\n", + domain->name )); + return; + } + if (get_global_winbindd_state_offline()) { DEBUG(10,("set_domain_online: domain %s remaining globally offline\n", domain->name )); @@ -1197,6 +1209,12 @@ NTSTATUS init_dc_connection(struct winbindd_domain *domain) { NTSTATUS result; + /* Internal connections never use the network. */ + if (domain->internal) { + domain->initialized = True; + return NT_STATUS_OK; + } + if (connection_ok(domain)) { if (!domain->initialized) { set_dc_type_and_flags(domain); @@ -1237,11 +1255,6 @@ static void set_dc_type_and_flags( struct winbindd_domain *domain ) ZERO_STRUCT( ctr ); - if (domain->internal) { - domain->initialized = True; - return; - } - if (!connection_ok(domain)) { return; } diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 53fa3da536..b28d66e8bc 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -462,16 +462,18 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai fstrcpy(domain->dcname, state->request.data.init_conn.dcname); } - if (strlen(domain->dcname) > 0) { - if (!resolve_name(domain->dcname, &ipaddr, 0x20)) { - DEBUG(2, ("Could not resolve DC name %s for domain %s\n", - domain->dcname, domain->name)); - return WINBINDD_ERROR; - } + if (!domain->internal) { + if (strlen(domain->dcname) > 0) { + if (!resolve_name(domain->dcname, &ipaddr, 0x20)) { + DEBUG(2, ("Could not resolve DC name %s for domain %s\n", + domain->dcname, domain->name)); + return WINBINDD_ERROR; + } - domain->dcaddr.sin_family = PF_INET; - putip((char *)&(domain->dcaddr.sin_addr), (char *)&ipaddr); - domain->dcaddr.sin_port = 0; + domain->dcaddr.sin_family = PF_INET; + putip((char *)&(domain->dcaddr.sin_addr), (char *)&ipaddr); + domain->dcaddr.sin_port = 0; + } } init_dc_connection(domain); |