summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/winbindd/winbindd_misc.c9
1 files changed, 9 insertions, 0 deletions
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());
}