mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r19212: Make sure domains marked internal don't do
network queries.
Jeremy.
(This used to be commit e4d5e1d90b
)
This commit is contained in:
parent
fe3fc9c8d5
commit
ed088e5ee0
@ -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;
|
||||
}
|
||||
|
@ -462,6 +462,7 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai
|
||||
fstrcpy(domain->dcname, state->request.data.init_conn.dcname);
|
||||
}
|
||||
|
||||
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",
|
||||
@ -473,6 +474,7 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai
|
||||
putip((char *)&(domain->dcaddr.sin_addr), (char *)&ipaddr);
|
||||
domain->dcaddr.sin_port = 0;
|
||||
}
|
||||
}
|
||||
|
||||
init_dc_connection(domain);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user