svn commit: samba r25276 - in branches/SAMBA_3_2_0/source/winbindd: .

metze at samba.org metze at samba.org
Fri Sep 21 10:32:12 GMT 2007


Author: metze
Date: 2007-09-21 10:32:12 +0000 (Fri, 21 Sep 2007)
New Revision: 25276

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25276

Log:
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
Modified:
   branches/SAMBA_3_2_0/source/winbindd/winbindd_misc.c


Changeset:
Modified: branches/SAMBA_3_2_0/source/winbindd/winbindd_misc.c
===================================================================
--- branches/SAMBA_3_2_0/source/winbindd/winbindd_misc.c	2007-09-21 10:25:33 UTC (rev 25275)
+++ branches/SAMBA_3_2_0/source/winbindd/winbindd_misc.c	2007-09-21 10:32:12 UTC (rev 25276)
@@ -236,6 +236,7 @@
 	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 @@
 
 	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);
 



More information about the samba-cvs mailing list