]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Use nt_status_np_pipe() in smbd_smb2_ioctl_pipe_{read,write}_done()
authorStefan Metzmacher <metze@samba.org>
Wed, 17 Jul 2024 16:04:56 +0000 (18:04 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 29 Jan 2025 11:20:33 +0000 (11:20 +0000)
We should return NT_STATUS_PIPE_DISCONNECTED or
NT_STATUS_PIPE_BROKEN in the same way SMB2 read/write do it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14430

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/smbd/smb2_ioctl_named_pipe.c

index f9e3dec049c087eebbbc7d3ce452cb6e95205189..4c1967cca67a0502b05b79c69b5673af7b6a43b5 100644 (file)
@@ -123,6 +123,7 @@ static void smbd_smb2_ioctl_pipe_write_done(struct tevent_req *subreq)
 
        TALLOC_FREE(subreq);
        if (!NT_STATUS_IS_OK(status)) {
+               status = nt_status_np_pipe(status);
                tevent_req_nterror(req, status);
                return;
        }
@@ -173,6 +174,7 @@ static void smbd_smb2_ioctl_pipe_read_done(struct tevent_req *subreq)
 
        TALLOC_FREE(subreq);
        if (!NT_STATUS_IS_OK(status)) {
+               status = nt_status_np_pipe(status);
                tevent_req_nterror(req, status);
                return;
        }