aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/firemon.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2020-08-22 10:21:16 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2020-08-22 10:21:16 -0400
commit2c769485e9ef48d6755d8f05bd6c05f00bf95d57 (patch)
tree100c28d82a54e5b665460b67913a7626fa11780e /src/firemon/firemon.c
parentminor cleanup: move pid functions from main.c to util.c (diff)
downloadfirejail-2c769485e9ef48d6755d8f05bd6c05f00bf95d57.tar.gz
firejail-2c769485e9ef48d6755d8f05bd6c05f00bf95d57.tar.zst
firejail-2c769485e9ef48d6755d8f05bd6c05f00bf95d57.zip
firemon fix for xdg-bus-proxy
Diffstat (limited to 'src/firemon/firemon.c')
-rw-r--r--src/firemon/firemon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c
index 39c05d63e..952659e39 100644
--- a/src/firemon/firemon.c
+++ b/src/firemon/firemon.c
@@ -70,6 +70,11 @@ int find_child(int id) {
70 // find the first child 70 // find the first child
71 for (i = 0; i < max_pids; i++) { 71 for (i = 0; i < max_pids; i++) {
72 if (pids[i].level == 2 && pids[i].parent == id) { 72 if (pids[i].level == 2 && pids[i].parent == id) {
73 // skip /usr/bin/xdg-dbus-proxy (started by firejail for dbus filtering)
74 char *cmdline = pid_proc_cmdline(i);
75 if (strncmp(cmdline, XDG_DBUS_PROXY_PATH, strlen(XDG_DBUS_PROXY_PATH)) == 0)
76 continue;
77
73 first_child = i; 78 first_child = i;
74 break; 79 break;
75 } 80 }
@@ -78,7 +83,7 @@ int find_child(int id) {
78 if (first_child == -1) 83 if (first_child == -1)
79 return -1; 84 return -1;
80 85
81 // find the second child 86 // find the second-level child
82 for (i = 0; i < max_pids; i++) { 87 for (i = 0; i < max_pids; i++) {
83 if (pids[i].level == 3 && pids[i].parent == first_child) 88 if (pids[i].level == 3 && pids[i].parent == first_child)
84 return i; 89 return i;