diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-07-30 08:43:14 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-07-31 14:42:04 +0200 |
commit | 471e67a7334050576b96184dbe0534982f8706fc (patch) | |
tree | 1ce5d2fbb66665434a953377b0375b46a42e963b | |
parent | 6f40637ca8b6c2a54551b711dfd34f24b3295a53 (diff) | |
download | samba-471e67a7334050576b96184dbe0534982f8706fc.tar.gz samba-471e67a7334050576b96184dbe0534982f8706fc.tar.bz2 samba-471e67a7334050576b96184dbe0534982f8706fc.zip |
s4:ldap_server: the tls code steals the original socket on its own now
metze
-rw-r--r-- | source4/ldap_server/ldap_extended.c | 1 | ||||
-rw-r--r-- | source4/ldap_server/ldap_server.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/ldap_server/ldap_extended.c b/source4/ldap_server/ldap_extended.c index 66ab4eea32..6d630b4922 100644 --- a/source4/ldap_server/ldap_extended.c +++ b/source4/ldap_server/ldap_extended.c @@ -33,7 +33,6 @@ static void ldapsrv_start_tls(void *private_data) { struct ldapsrv_starttls_context *ctx = talloc_get_type(private_data, struct ldapsrv_starttls_context); talloc_steal(ctx->conn->connection, ctx->tls_socket); - talloc_unlink(ctx->conn->connection, ctx->conn->connection->socket); ctx->conn->sockets.tls = ctx->tls_socket; ctx->conn->connection->socket = ctx->tls_socket; diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 2f32bb6019..72431e9669 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -49,6 +49,8 @@ void ldapsrv_terminate_connection(struct ldapsrv_connection *conn, const char *reason) { + packet_recv_disable(conn->packet); + TALLOC_FREE(conn->packet); stream_terminate_connection(conn->connection, reason); } @@ -365,7 +367,6 @@ static void ldapsrv_accept(struct stream_connection *c, ldapsrv_terminate_connection(conn, "ldapsrv_accept: tls_init_server() failed"); return; } - talloc_unlink(c, c->socket); talloc_steal(c, tls_socket); c->socket = tls_socket; conn->sockets.tls = tls_socket; |