]> git.samba.org - metze/samba-autobuild/.git/commitdiff
libcli/named_pipe_auth: let tstream_npa_existing_socket use tstream_bsd_fail_readv_fi...
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jan 2023 09:44:25 +0000 (10:44 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 24 Oct 2023 09:36:38 +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>
libcli/named_pipe_auth/npa_tstream.c

index 07f9cf91d73b5a145b211abb81b242bb7fccc2a7..a72519e5da28b4cce7598f70dc18375ec8b5b15e 100644 (file)
@@ -1008,6 +1008,8 @@ int _tstream_npa_existing_socket(TALLOC_CTX *mem_ctx,
        if (ret == -1) {
                return -1;
        }
+       /* as server we want to fail early */
+       tstream_bsd_fail_readv_first_error(transport, true);
        return _tstream_npa_existing_stream(
                mem_ctx, &transport, file_type, _stream, location);
 }