From b88cef5db1132c1e6e94ae282f94d980a959bb15 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Thu, 13 Oct 2016 16:45:28 -0400 Subject: testing --- src/lib/common.c | 9 ++++++--- src/lib/pid.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/common.c b/src/lib/common.c index acb6bd3b4..fc4c167ba 100644 --- a/src/lib/common.c +++ b/src/lib/common.c @@ -201,7 +201,7 @@ char *pid_proc_cmdline(const pid_t pid) { } // return 1 if firejail --x11 on command line -int pid_proc_cmdline_x11(const pid_t pid) { +int pid_proc_cmdline_x11_xpra_xephyr(const pid_t pid) { // if comm is not firejail return 0 char *comm = pid_proc_comm(pid); if (strcmp(comm, "firejail") != 0) { @@ -248,8 +248,11 @@ int pid_proc_cmdline_x11(const pid_t pid) { break; if (strncmp(arg, "--", 2) != 0) break; - - // check x11 + + if (strcmp(arg, "--x11=xorg") == 0) + return 0; + + // check x11 xpra or xephyr if (strncmp(arg, "--x11", 5) == 0) return 1; i += strlen(arg); diff --git a/src/lib/pid.c b/src/lib/pid.c index bbb123b81..ef1a428fb 100644 --- a/src/lib/pid.c +++ b/src/lib/pid.c @@ -341,7 +341,7 @@ void pid_read(pid_t mon_pid) { } if ((strncmp(ptr, "firejail", 8) == 0) && (mon_pid == 0 || mon_pid == pid)) { - if (pid_proc_cmdline_x11(pid)) + if (pid_proc_cmdline_x11_xpra_xephyr(pid)) pids[pid].level = -1; else pids[pid].level = 1; -- cgit v1.2.3-54-g00ecf