summaryrefslogtreecommitdiff
path: root/source4/ldap_server/ldap_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ldap_server/ldap_server.c')
-rw-r--r--source4/ldap_server/ldap_server.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 99889f1f7f..a2521ca406 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -397,7 +397,7 @@ static void ldapsrv_accept(struct stream_connection *c)
}
cli_credentials_set_conf(server_credentials, conn->lp_ctx);
- status = cli_credentials_set_machine_account(server_credentials);
+ status = cli_credentials_set_machine_account(server_credentials, conn->lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
stream_terminate_connection(c, talloc_asprintf(conn, "Failed to obtain server credentials, perhaps a standalone server?: %s\n", nt_errstr(status)));
return;
@@ -546,15 +546,19 @@ static void ldapsrv_task_init(struct task_server *task)
if (ldap_service->tls_params == NULL) goto failed;
if (lp_interfaces(task->lp_ctx) && lp_bind_interfaces_only(task->lp_ctx)) {
- int num_interfaces = iface_count(task->lp_ctx);
+ struct interface *ifaces;
+ int num_interfaces;
int i;
+ load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+ num_interfaces = iface_count(ifaces);
+
/* We have been given an interfaces line, and been
told to only bind to those interfaces. Create a
socket per interface and bind to only these.
*/
for(i = 0; i < num_interfaces; i++) {
- const char *address = iface_n_ip(task->lp_ctx, i);
+ const char *address = iface_n_ip(ifaces, i);
status = add_socket(task->event_ctx, task->lp_ctx, model_ops, address, ldap_service);
if (!NT_STATUS_IS_OK(status)) goto failed;
}