From: Volker Lendecke Date: Tue, 21 May 2024 08:12:22 +0000 (+0200) Subject: smbd: Return correct error for fallback sendfile X-Git-Tag: tdb-1.4.11~623 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f0628c8485c6c258ea8733a9cfc6ca0bb89e48b;p=thirdparty%2Fsamba.git smbd: Return correct error for fallback sendfile Signed-off-by: Volker Lendecke Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index 576a2c555dc..877ca955cdd 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -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),