From dce23151e01adcbecc55fae51f7c3f4d085c2c4b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 26 Sep 2011 15:56:23 -0700 Subject: s4-ldap_server: Fix segfault on startup failure of ldap server --- source4/ldap_server/ldap_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 411be29440..69a99aa0f3 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -334,6 +334,8 @@ static void ldapsrv_accept(struct stream_connection *c, conn->session_info = session_info; + conn->sockets.active = conn->sockets.raw; + if (!NT_STATUS_IS_OK(ldapsrv_backend_Init(conn))) { ldapsrv_terminate_connection(conn, "backend Init failed"); return; @@ -345,8 +347,6 @@ static void ldapsrv_accept(struct stream_connection *c, /* register the server */ irpc_add_name(c->msg_ctx, "ldap_server"); - conn->sockets.active = conn->sockets.raw; - if (port != 636 && port != 3269) { ldapsrv_call_read_next(conn); return; -- cgit