aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/x11.c')
-rw-r--r--src/firejail/x11.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/firejail/x11.c b/src/firejail/x11.c
index 5e8fb9bbd..218113f46 100644
--- a/src/firejail/x11.c
+++ b/src/firejail/x11.c
@@ -27,6 +27,7 @@
27#include <sys/mount.h> 27#include <sys/mount.h>
28 28
29void fs_x11(void) { 29void fs_x11(void) {
30#ifdef HAVE_X11
30 // extract display 31 // extract display
31 char *d = getenv("DISPLAY"); 32 char *d = getenv("DISPLAY");
32 if (!d) 33 if (!d)
@@ -94,9 +95,11 @@ void fs_x11(void) {
94 if (mount(RUN_RO_DIR, RUN_WHITELIST_X11_DIR, "none", MS_BIND, "mode=400,gid=0") == -1) 95 if (mount(RUN_RO_DIR, RUN_WHITELIST_X11_DIR, "none", MS_BIND, "mode=400,gid=0") == -1)
95 errExit("mount"); 96 errExit("mount");
96 fs_logger2("blacklist", RUN_WHITELIST_X11_DIR); 97 fs_logger2("blacklist", RUN_WHITELIST_X11_DIR);
98#endif
97} 99}
98 100
99 101
102#ifdef HAVE_X11
100void x11_start(int argc, char **argv) { 103void x11_start(int argc, char **argv) {
101 EUID_ASSERT(); 104 EUID_ASSERT();
102 int i; 105 int i;
@@ -215,3 +218,4 @@ void x11_start(int argc, char **argv) {
215 printf("Xpra server pid %d, client pid %d\n", server, client); 218 printf("Xpra server pid %d, client pid %d\n", server, client);
216 exit(0); 219 exit(0);
217} 220}
221#endif