diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-05-12 12:35:02 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-06-06 12:26:10 +1000 |
commit | dc8c8fd9e4f85974cd0665e613d4422ba8dd900e (patch) | |
tree | 0f1f60584986c4648ace8af742d2023fe5c87dc8 /source4/ldap_server | |
parent | d510687408c03291df767e0ccacebcd4a360646c (diff) | |
download | samba-dc8c8fd9e4f85974cd0665e613d4422ba8dd900e.tar.gz samba-dc8c8fd9e4f85974cd0665e613d4422ba8dd900e.tar.bz2 samba-dc8c8fd9e4f85974cd0665e613d4422ba8dd900e.zip |
s4-ipv6: use iface_list_wildcard() to listen on IPv6
when we need to listen on a wildcard address, we now listen on a list
of sockets, usually 0.0.0.0 and ::
Diffstat (limited to 'source4/ldap_server')
-rw-r--r-- | source4/ldap_server/ldap_server.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 01846add64..605a4a3cc2 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -964,9 +964,18 @@ static void ldapsrv_task_init(struct task_server *task) if (!NT_STATUS_IS_OK(status)) goto failed; } } else { - status = add_socket(task, task->lp_ctx, model_ops, - lpcfg_socket_address(task->lp_ctx), ldap_service); - if (!NT_STATUS_IS_OK(status)) goto failed; + const char **wcard; + int i; + wcard = iface_list_wildcard(task, task->lp_ctx); + if (wcard == NULL) { + DEBUG(0,("No wildcard addresses available\n")); + goto failed; + } + for (i=0; wcard[i]; i++) { + status = add_socket(task, task->lp_ctx, model_ops, wcard[i], ldap_service); + if (!NT_STATUS_IS_OK(status)) goto failed; + } + talloc_free(wcard); } ldapi_path = lpcfg_private_path(ldap_service, task->lp_ctx, "ldapi"); |