diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index 71cefffe0..f6aba7048 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -502,12 +502,10 @@ void fs_proc_sys_dev_boot(void) { | |||
502 | printf("Remounting /sys directory\n"); | 502 | printf("Remounting /sys directory\n"); |
503 | if (umount2("/sys", MNT_DETACH) < 0) | 503 | if (umount2("/sys", MNT_DETACH) < 0) |
504 | fprintf(stderr, "Warning: failed to unmount /sys\n"); | 504 | fprintf(stderr, "Warning: failed to unmount /sys\n"); |
505 | else { | 505 | if (mount("sysfs", "/sys", "sysfs", MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REC, NULL) < 0) |
506 | if (mount("sysfs", "/sys", "sysfs", MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REC, NULL) < 0) | 506 | fprintf(stderr, "Warning: failed to mount /sys\n"); |
507 | fprintf(stderr, "Warning: failed to mount /sys\n"); | 507 | else |
508 | else | 508 | fs_logger("remount /sys"); |
509 | fs_logger("remount /sys"); | ||
510 | } | ||
511 | 509 | ||
512 | disable_file(BLACKLIST_FILE, "/sys/firmware"); | 510 | disable_file(BLACKLIST_FILE, "/sys/firmware"); |
513 | disable_file(BLACKLIST_FILE, "/sys/hypervisor"); | 511 | disable_file(BLACKLIST_FILE, "/sys/hypervisor"); |