summaryrefslogtreecommitdiff
path: root/source4/ldap_server/ldap_server.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-09-26 15:56:23 -0700
committerAndrew Bartlett <abartlet@samba.org>2011-09-27 22:43:06 +0200
commitdce23151e01adcbecc55fae51f7c3f4d085c2c4b (patch)
treee1ab6586ab66e057775d671ae0b88f5012681586 /source4/ldap_server/ldap_server.c
parentb5cc6a0ad2ff3a3bf2004f65642f51ac64c8df3f (diff)
downloadsamba-dce23151e01adcbecc55fae51f7c3f4d085c2c4b.tar.gz
s4-ldap_server: Fix segfault on startup failure of ldap server
Diffstat (limited to 'source4/ldap_server/ldap_server.c')
-rw-r--r--source4/ldap_server/ldap_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 411be294401..69a99aa0f36 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;