From 4ab70e8438361fd41b71c959d0d20137959a51ea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 21 Sep 2007 09:35:53 +0000 Subject: r25270: for internal domains we should not ask a remote DC. metze (This used to be commit 579ed8ae87e449dbd5e4f78609754df0556fbf68) --- source3/winbindd/winbindd_misc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3') diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c index 1f23bf1bee..30386cc6eb 100644 --- a/source3/winbindd/winbindd_misc.c +++ b/source3/winbindd/winbindd_misc.c @@ -209,12 +209,21 @@ enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain * void winbindd_getdcname(struct winbindd_cli_state *state) { + struct winbindd_domain *domain; + state->request.domain_name [sizeof(state->request.domain_name)-1] = '\0'; DEBUG(3, ("[%5lu]: Get DC name for %s\n", (unsigned long)state->pid, state->request.domain_name)); + domain = find_domain_from_name_noinit(state->request.domain_name); + if (domain && domain->internal) { + fstrcpy(state->response.data.dc_name, global_myname()); + request_ok(state); + return; + } + sendto_domain(state, find_our_domain()); } -- cgit