diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index 4dff6fce8..cfb724696 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -966,6 +966,19 @@ void fs_overlayfs(void) { | |||
966 | errExit("mounting /run"); | 966 | errExit("mounting /run"); |
967 | fs_logger("whitelist /run"); | 967 | fs_logger("whitelist /run"); |
968 | 968 | ||
969 | // mount-bind /tmp/.X11-unix directory | ||
970 | if (arg_debug) | ||
971 | printf("Mounting /tmp/.X11-unix\n"); | ||
972 | char *x11; | ||
973 | if (asprintf(&x11, "%s/tmp/.X11-unix", oroot) == -1) | ||
974 | errExit("asprintf"); | ||
975 | if (mount("/tmp/.X11-unix", x11, NULL, MS_BIND|MS_REC, NULL) < 0) | ||
976 | errExit("mounting /tmp/.X11-unix"); | ||
977 | fs_logger("whitelist /tmp/.X11-unix"); | ||
978 | |||
979 | |||
980 | |||
981 | |||
969 | // chroot in the new filesystem | 982 | // chroot in the new filesystem |
970 | if (chroot(oroot) == -1) | 983 | if (chroot(oroot) == -1) |
971 | errExit("chroot"); | 984 | errExit("chroot"); |