From f9540c2b13f6fc4b5e54e1535e454121ca0b4ba4 Mon Sep 17 00:00:00 2001 From: Albert Kim Date: Thu, 7 Jul 2022 10:43:18 -0700 Subject: Warn when encountering EIO during remount Instead of simply erroring out, just warn the user that a filesystem was unable to be remounted due to EIO. This is helpful for FUSE filesystems which might be buggy or having issues. --- src/firejail/fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/firejail/fs.c b/src/firejail/fs.c index f30e56e8d..b44eb65ee 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c @@ -530,7 +530,9 @@ static void fs_remount_simple(const char *path, OPERATION op) { if (fstat(fd, &s) < 0) { // fstat can fail with EACCES if path is a FUSE mount, // mounted without 'allow_root' or 'allow_other' - if (errno != EACCES) + // fstat can also fail with EIO if the underlying FUSE system + // is being buggy + if (errno != EACCES && errno != EIO) errExit("fstat"); close(fd); goto out; -- cgit v1.2.3-54-g00ecf