diff options
author | 2016-03-09 20:51:50 -0500 | |
---|---|---|
committer | 2016-03-09 20:51:50 -0500 | |
commit | 3fde90a32094fdf992eab077fd2caa72f7054945 (patch) | |
tree | 77ca84063758bdaa70a6ed13bb1f3cd68d5b486a /src | |
parent | fixes (diff) | |
download | firejail-3fde90a32094fdf992eab077fd2caa72f7054945.tar.gz firejail-3fde90a32094fdf992eab077fd2caa72f7054945.tar.zst firejail-3fde90a32094fdf992eab077fd2caa72f7054945.zip |
fix overlayfs problem
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index 5efdd4d87..920f6d87d 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -874,9 +874,19 @@ void fs_overlayfs(void) { | |||
874 | if (mount("/dev", dev, NULL, MS_BIND|MS_REC, NULL) < 0) | 874 | if (mount("/dev", dev, NULL, MS_BIND|MS_REC, NULL) < 0) |
875 | errExit("mounting /dev"); | 875 | errExit("mounting /dev"); |
876 | 876 | ||
877 | // mount-bind run directory | ||
878 | if (arg_debug) | ||
879 | printf("Mounting /run\n"); | ||
880 | char *run; | ||
881 | if (asprintf(&run, "%s/run", oroot) == -1) | ||
882 | errExit("asprintf"); | ||
883 | if (mount("/run", run, NULL, MS_BIND|MS_REC, NULL) < 0) | ||
884 | errExit("mounting /dev"); | ||
885 | |||
877 | // chroot in the new filesystem | 886 | // chroot in the new filesystem |
878 | if (chroot(oroot) == -1) | 887 | if (chroot(oroot) == -1) |
879 | errExit("chroot"); | 888 | errExit("chroot"); |
889 | |||
880 | // update /var directory in order to support multiple sandboxes running on the same root directory | 890 | // update /var directory in order to support multiple sandboxes running on the same root directory |
881 | if (!arg_private_dev) | 891 | if (!arg_private_dev) |
882 | fs_dev_shm(); | 892 | fs_dev_shm(); |