From 5081731862b0185be70493fb7a6718dc26f530a7 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Mon, 10 Aug 2020 20:18:26 +0200 Subject: [PATCH] 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 --- src/firejail/chroot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { close(fd); // x11 - if (getenv("FIREJAIL_X11")) { + // if users want this mount, they should set FIREJAIL_CHROOT_X11 + if (getenv("FIREJAIL_X11") || getenv("FIREJAIL_CHROOT_X11")) { if (arg_debug) printf("Mounting /tmp/.X11-unix on chroot /tmp/.X11-unix\n"); check_subdir(parentfd, "tmp/.X11-unix", 0);