summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-27 10:22:25 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-27 13:00:24 +0200
commitcf3c595b9c6778ee4dea28176936013bc1f1e876 (patch)
treeeb495180d09a31efd494d4f213dae363783be3a1
parent4d191b6fa7b96ed56912bf68e6771ffb8e3cfe12 (diff)
downloadsamba-cf3c595b9c6778ee4dea28176936013bc1f1e876.tar.gz
samba-cf3c595b9c6778ee4dea28176936013bc1f1e876.tar.bz2
samba-cf3c595b9c6778ee4dea28176936013bc1f1e876.zip
s4:cldap_server: allow src_address = NULL in fill_netlogon_samlogon_response()
If we don't have the client address, we assume it's a local call, maybe ncalrpc. metze
-rw-r--r--source4/cldap_server/netlogon.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 1993c1f7db..e24f1b376e 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -270,8 +270,16 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
src_address, NULL);
NT_STATUS_HAVE_NO_MEMORY(client_site);
load_interfaces(mem_ctx, lp_interfaces(lp_ctx), &ifaces);
- pdc_ip = iface_best_ip(ifaces, src_address);
-
+ /*
+ * TODO: the caller should pass the address which the client
+ * used to trigger this call, as the client is able to reach
+ * this ip.
+ */
+ if (src_address) {
+ pdc_ip = iface_best_ip(ifaces, src_address);
+ } else {
+ pdc_ip = iface_n_ip(ifaces, 0);
+ }
ZERO_STRUCTP(netlogon);
/* check if either of these bits is present */