From c9c18b4cd34bff4df679bb9706fe98f1a8843f26 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 9 Apr 2016 09:38:59 -0400 Subject: networking fixes --- src/firemon/netstats.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/firemon/netstats.c') diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c index 3b6c128ae..89e4202bd 100644 --- a/src/firemon/netstats.c +++ b/src/firemon/netstats.c @@ -117,8 +117,14 @@ static void print_proc(int index, int itv, int col) { } else ptrcmd = cmd; - // if the command doesn't have a --net= option, don't print - if (strstr(ptrcmd, "--net=") == NULL) { + + // check network namespace + char *name; + if (asprintf(&name, "/run/firejail/network/%d-netmap", index) == -1) + errExit("asprintf"); + struct stat s; + if (stat(name, &s) == -1) { + // the sandbox doesn't have a --net= option, don't print if (cmd) free(cmd); return; -- cgit v1.2.3-54-g00ecf