]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Return correct error for fallback sendfile
authorVolker Lendecke <vl@samba.org>
Tue, 21 May 2024 08:12:22 +0000 (10:12 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2024 04:23:29 +0000 (04:23 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/smbd/smb2_read.c

index 576a2c555dcf0461b25cd250a17335c530efead4..877ca955cdd8927e205724b36aac74237c78fda0 100644 (file)
@@ -304,6 +304,7 @@ normal_read:
        }
        nread = fake_sendfile(xconn, fsp, in_offset, in_length);
        if (nread == -1) {
+               saved_errno = errno;
                DBG_ERR("fake_sendfile failed for file %s (%s) for client %s. "
                        "Terminating\n",
                        fsp_str_dbg(fsp),