diff options
Diffstat (limited to 'src/firejail/x11.c')
-rw-r--r-- | src/firejail/x11.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/firejail/x11.c b/src/firejail/x11.c index 774294ff1..2fa7f84d8 100644 --- a/src/firejail/x11.c +++ b/src/firejail/x11.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <dirent.h> | 27 | #include <dirent.h> |
28 | #include <sys/mount.h> | 28 | #include <sys/mount.h> |
29 | #include <sys/wait.h> | 29 | #include <sys/wait.h> |
30 | int mask_x11_abstract_socket = 0; | ||
30 | 31 | ||
31 | #ifdef HAVE_X11 | 32 | #ifdef HAVE_X11 |
32 | // return 1 if xpra is installed on the system | 33 | // return 1 if xpra is installed on the system |
@@ -51,6 +52,7 @@ static int x11_check_xephyr(void) { | |||
51 | return 1; | 52 | return 1; |
52 | } | 53 | } |
53 | 54 | ||
55 | #if 0 | ||
54 | // check for X11 abstract sockets | 56 | // check for X11 abstract sockets |
55 | static int x11_abstract_sockets_present(void) { | 57 | static int x11_abstract_sockets_present(void) { |
56 | char *path; | 58 | char *path; |
@@ -75,6 +77,7 @@ static int x11_abstract_sockets_present(void) { | |||
75 | 77 | ||
76 | return 0; | 78 | return 0; |
77 | } | 79 | } |
80 | #endif | ||
78 | 81 | ||
79 | static int random_display_number(void) { | 82 | static int random_display_number(void) { |
80 | int i; | 83 | int i; |
@@ -594,6 +597,8 @@ void x11_start(int argc, char **argv) { | |||
594 | 597 | ||
595 | void x11_block(void) { | 598 | void x11_block(void) { |
596 | #ifdef HAVE_X11 | 599 | #ifdef HAVE_X11 |
600 | mask_x11_abstract_socket = 1; | ||
601 | #if 0 | ||
597 | // check abstract socket presence and network namespace options | 602 | // check abstract socket presence and network namespace options |
598 | if ((!arg_nonetwork && !cfg.bridge0.configured && !cfg.interface0.configured) | 603 | if ((!arg_nonetwork && !cfg.bridge0.configured && !cfg.interface0.configured) |
599 | && x11_abstract_sockets_present()) { | 604 | && x11_abstract_sockets_present()) { |
@@ -604,6 +609,7 @@ void x11_block(void) { | |||
604 | " (eg. to your display manager config, or /etc/X11/xinit/xserverrc)\n"); | 609 | " (eg. to your display manager config, or /etc/X11/xinit/xserverrc)\n"); |
605 | exit(1); | 610 | exit(1); |
606 | } | 611 | } |
612 | #endif | ||
607 | 613 | ||
608 | // blacklist sockets | 614 | // blacklist sockets |
609 | profile_check_line("blacklist /tmp/.X11-unix", 0, NULL); | 615 | profile_check_line("blacklist /tmp/.X11-unix", 0, NULL); |