summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-11-24 09:25:35 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-27 12:50:48 +0100
commitb89374934feced586b21152795f40543fe7b007b (patch)
treee39b3276d23c3f66661c97a7ee132630a69121ff /source4
parentfc26e29f8ed1cad0875801782178696ce5f9d1f1 (diff)
downloadsamba-b89374934feced586b21152795f40543fe7b007b.tar.gz
samba-b89374934feced586b21152795f40543fe7b007b.tar.bz2
samba-b89374934feced586b21152795f40543fe7b007b.zip
s4:cldap_server/netlogon.c - DS_SERVER_CLOSEST handling
DS_SERVER_CLOSEST is only set when the client and server site coincide. MS-NRPC 2.2.1.2.1 Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/cldap_server/netlogon.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index c9c92f6343..0c4abebf83 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -224,7 +224,6 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
server_type =
DS_SERVER_DS | DS_SERVER_TIMESERV |
- DS_SERVER_CLOSEST |
DS_SERVER_GOOD_TIMESERV;
#if 0
@@ -276,13 +275,17 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
dns_domain);
NT_STATUS_HAVE_NO_MEMORY(pdc_dns_name);
flatname = lpcfg_workgroup(lp_ctx);
+
server_site = samdb_server_site_name(sam_ctx, mem_ctx);
NT_STATUS_HAVE_NO_MEMORY(server_site);
client_site = samdb_client_site_name(sam_ctx, mem_ctx,
src_address, NULL);
NT_STATUS_HAVE_NO_MEMORY(client_site);
- load_interface_list(mem_ctx, lp_ctx, &ifaces);
+ if (strcasecmp(server_site, client_site) == 0) {
+ server_type |= DS_SERVER_CLOSEST;
+ }
+ load_interface_list(mem_ctx, lp_ctx, &ifaces);
if (src_address) {
pdc_ip = iface_list_best_ip(ifaces, src_address);
} else {