mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-21 06:45:29 -06:00
fixed /sys mounting broken during overlayfs cleanup
This commit is contained in:
parent
890b578bfd
commit
b537aa57b9
1 changed files with 2 additions and 0 deletions
|
|
@ -728,6 +728,8 @@ void fs_proc_sys_dev_boot(void) {
|
||||||
/* Mount a version of /sys that describes the network namespace */
|
/* Mount a version of /sys that describes the network namespace */
|
||||||
if (arg_debug)
|
if (arg_debug)
|
||||||
printf("Remounting /sys directory\n");
|
printf("Remounting /sys directory\n");
|
||||||
|
if (umount2("/sys", MNT_DETACH) < 0 && !cfg.chrootdir)
|
||||||
|
fwarning("failed to unmount /sys\n");
|
||||||
if (mount("sysfs", "/sys", "sysfs", MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REC, NULL) < 0)
|
if (mount("sysfs", "/sys", "sysfs", MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REC, NULL) < 0)
|
||||||
fwarning("failed to mount /sys\n");
|
fwarning("failed to mount /sys\n");
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue