From d991805cd27fe4fa8d11720e434c201ee10658d8 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Mon, 11 Jul 2022 21:35:53 +0200 Subject: remove dependency on sendfile syscall --- src/firejail/chroot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/firejail/chroot.c b/src/firejail/chroot.c index 551948318..ccd954a93 100644 --- a/src/firejail/chroot.c +++ b/src/firejail/chroot.c @@ -22,7 +22,6 @@ #include "firejail.h" #include "../include/gcov_wrapper.h" #include -#include #include #include @@ -91,8 +90,8 @@ static void update_file(int parentfd, const char *relpath) { close(in); goto errout; } - if (sendfile(out, in, NULL, src.st_size) == -1) - errExit("sendfile"); + if (copy_file_by_fd(in, out) != 0) + errExit("copy_file_by_fd"); close(in); close(out); return; -- cgit v1.2.3-54-g00ecf