From 07ea1c0e60c11b3efe62fd251347f68a4f7ea17c Mon Sep 17 00:00:00 2001 From: smitsohu Date: Tue, 16 Feb 2021 17:22:51 +0100 Subject: chroot: disable/enable x11 handling at compile time --- 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 88df8b9d4..d7e96cf4c 100644 --- a/src/firejail/chroot.c +++ b/src/firejail/chroot.c @@ -171,7 +171,7 @@ void fs_chroot(const char *rootdir) { free(proc); close(fd); - // x11 +#ifdef HAVE_X11 // if users want this mount, they should set FIREJAIL_CHROOT_X11 if (env_get("FIREJAIL_X11") || env_get("FIREJAIL_CHROOT_X11")) { if (arg_debug) @@ -199,6 +199,7 @@ void fs_chroot(const char *rootdir) { free(proc); close(fd); } +#endif // HAVE_X11 // some older distros don't have a /run directory, create one by default if (mkdirat(parentfd, "run", 0755) == -1 && errno != EEXIST) -- cgit v1.2.3-70-g09d2