1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

Revert "s4-netlogon: fixed breakage of dcesrv_netr_GetAnyDCName in sites patch"

This reverts commit e88a54a87e185b44e2d216bd853e6a87bf950be6.

This isn't the correct behaviour. See MS-NRPC documentation under the
"GetAnyDCName" section.
This commit is contained in:
Matthias Dieter Wallnöfer 2010-04-27 08:07:19 +02:00
parent 280d06f8b5
commit 581f86ba73

View File

@ -1019,6 +1019,12 @@ static WERROR dcesrv_netr_GetAnyDCName(struct dcesrv_call_state *dce_call, TALLO
}
if (strcasecmp(r->in.domainname, lp_workgroup(lp_ctx)) == 0) {
/* well we asked for a DC of our own domain */
if (samdb_is_pdc(sam_ctx)) {
/* we are the PDC of the specified domain */
return WERR_NO_SUCH_DOMAIN;
}
*r->out.dcname = talloc_asprintf(mem_ctx, "\\%s",
lp_netbios_name(lp_ctx));
W_ERROR_HAVE_NO_MEMORY(*r->out.dcname);