diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-09-21 10:25:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:56 -0500 |
commit | ba93d0e5c8418eb11a5fa0bb48c1ec3a0ebd403b (patch) | |
tree | f3863bc75ea8920843955840be2bdba669777efd /source3/winbindd | |
parent | 7cbcb5f8c5bfd9bac6527232e7f5d011f03ed9ac (diff) | |
download | samba-ba93d0e5c8418eb11a5fa0bb48c1ec3a0ebd403b.tar.gz samba-ba93d0e5c8418eb11a5fa0bb48c1ec3a0ebd403b.tar.bz2 samba-ba93d0e5c8418eb11a5fa0bb48c1ec3a0ebd403b.zip |
r25275: w2k3 (as PDC emulator) returns WERR_NO_SUCH_DOMAIN to netlogon_getanydcname()
when called for it's own domain. So we should use netlogon_getdcname() which
returns WERR_OK:-)
gd: feel free to usage rpccli_netlogon_dsr_getdcname(), but please make sure
the new WINBIND-STRUCT-GETDCNAME test is still passing.
metze
(This used to be commit 9a9c164366a252ab8268b687699d54048ced993f)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_misc.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c index 30386cc6eb..5513e1790b 100644 --- a/source3/winbindd/winbindd_misc.c +++ b/source3/winbindd/winbindd_misc.c @@ -236,6 +236,7 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, NTSTATUS result; WERROR werr; unsigned int orig_timeout; + struct winbindd_domain *req_domain; state->request.domain_name [sizeof(state->request.domain_name)-1] = '\0'; @@ -255,9 +256,18 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, orig_timeout = cli_set_timeout(netlogon_pipe->cli, 35000); - werr = rpccli_netlogon_getanydcname(netlogon_pipe, state->mem_ctx, domain->dcname, - state->request.domain_name, - dcname_slash); + req_domain = find_domain_from_name_noinit(state->request.domain_name); + if (req_domain == domain) { + werr = rpccli_netlogon_getdcname(netlogon_pipe, state->mem_ctx, + domain->dcname, + state->request.domain_name, + dcname_slash); + } else { + werr = rpccli_netlogon_getanydcname(netlogon_pipe, state->mem_ctx, + domain->dcname, + state->request.domain_name, + dcname_slash); + } /* And restore our original timeout. */ cli_set_timeout(netlogon_pipe->cli, orig_timeout); |