diff options
author | smitsohu <smitsohu@gmail.com> | 2021-02-16 17:22:51 +0100 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2021-02-16 17:22:51 +0100 |
commit | 07ea1c0e60c11b3efe62fd251347f68a4f7ea17c (patch) | |
tree | 3267a109448b410ec5f3b4172ba833251843642a /src | |
parent | firejail in firejail: don't clear environment variables (diff) | |
download | firejail-07ea1c0e60c11b3efe62fd251347f68a4f7ea17c.tar.gz firejail-07ea1c0e60c11b3efe62fd251347f68a4f7ea17c.tar.zst firejail-07ea1c0e60c11b3efe62fd251347f68a4f7ea17c.zip |
chroot: disable/enable x11 handling at compile time
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/chroot.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) { | |||
171 | free(proc); | 171 | free(proc); |
172 | close(fd); | 172 | close(fd); |
173 | 173 | ||
174 | // x11 | 174 | #ifdef HAVE_X11 |
175 | // if users want this mount, they should set FIREJAIL_CHROOT_X11 | 175 | // if users want this mount, they should set FIREJAIL_CHROOT_X11 |
176 | if (env_get("FIREJAIL_X11") || env_get("FIREJAIL_CHROOT_X11")) { | 176 | if (env_get("FIREJAIL_X11") || env_get("FIREJAIL_CHROOT_X11")) { |
177 | if (arg_debug) | 177 | if (arg_debug) |
@@ -199,6 +199,7 @@ void fs_chroot(const char *rootdir) { | |||
199 | free(proc); | 199 | free(proc); |
200 | close(fd); | 200 | close(fd); |
201 | } | 201 | } |
202 | #endif // HAVE_X11 | ||
202 | 203 | ||
203 | // some older distros don't have a /run directory, create one by default | 204 | // some older distros don't have a /run directory, create one by default |
204 | if (mkdirat(parentfd, "run", 0755) == -1 && errno != EEXIST) | 205 | if (mkdirat(parentfd, "run", 0755) == -1 && errno != EEXIST) |