aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2020-08-10 20:18:26 +0200
committerLibravatar GitHub <noreply@github.com>2020-08-10 20:18:26 +0200
commit5081731862b0185be70493fb7a6718dc26f530a7 (patch)
tree65a42e98a9d066bc344fa52ca8b5c8ac85053428 /src
parentmount sandbox lib directory ro,nosuid,nodev (diff)
downloadfirejail-5081731862b0185be70493fb7a6718dc26f530a7.tar.gz
firejail-5081731862b0185be70493fb7a6718dc26f530a7.tar.zst
firejail-5081731862b0185be70493fb7a6718dc26f530a7.zip
chroot: expose x11 session if FIREJAIL_CHROOT_X11 is set
add check so that environment variable FIREJAIL_CHROOT_X11 can be used to mount /tmp/.X11-unix into the chroot; issue #3568
Diffstat (limited to 'src')
-rw-r--r--src/firejail/chroot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/chroot.c b/src/firejail/chroot.c
index cae52e20b..5fc6c8298 100644
--- a/src/firejail/chroot.c
+++ b/src/firejail/chroot.c
@@ -165,7 +165,8 @@ void fs_chroot(const char *rootdir) {
165 close(fd); 165 close(fd);
166 166
167 // x11 167 // x11
168 if (getenv("FIREJAIL_X11")) { 168 // if users want this mount, they should set FIREJAIL_CHROOT_X11
169 if (getenv("FIREJAIL_X11") || getenv("FIREJAIL_CHROOT_X11")) {
169 if (arg_debug) 170 if (arg_debug)
170 printf("Mounting /tmp/.X11-unix on chroot /tmp/.X11-unix\n"); 171 printf("Mounting /tmp/.X11-unix on chroot /tmp/.X11-unix\n");
171 check_subdir(parentfd, "tmp/.X11-unix", 0); 172 check_subdir(parentfd, "tmp/.X11-unix", 0);