]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:ldap_server: make use of tstream_bsd_fail_readv_first_error(true)
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jan 2023 09:39:48 +0000 (10:39 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 24 Oct 2023 09:36:37 +0000 (09:36 +0000)
This avoids doing useless work in case the client connection
is already broken.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/ldap_server/ldap_server.c

index 38c29be3ecbbd37ff40baf38968eb22df5f10dbe..08acffc7d44520e8ac9919fc57e9d22547871de0 100644 (file)
@@ -338,6 +338,8 @@ static void ldapsrv_accept(struct stream_connection *c,
                return;
        }
        socket_set_flags(c->socket, SOCKET_FLAG_NOCLOSE);
+       /* as server we want to fail early */
+       tstream_bsd_fail_readv_first_error(conn->sockets.raw, true);
 
        conn->connection  = c;
        conn->service     = ldapsrv_service;