summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-27 08:07:19 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-27 08:07:19 +0200
commit581f86ba73b773f08996d473aaf0fad3e94ae2f3 (patch)
treee8e3a5b21c402c1f8f3c5088be0889abd5bed731 /source4/rpc_server
parent280d06f8b5734555eb3cb8423d7f9ad1bdc83792 (diff)
downloadsamba-581f86ba73b773f08996d473aaf0fad3e94ae2f3.tar.gz
samba-581f86ba73b773f08996d473aaf0fad3e94ae2f3.tar.bz2
samba-581f86ba73b773f08996d473aaf0fad3e94ae2f3.zip
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.
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 8681e680d3..856d26e964 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -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);