From c95c03e2fe90893c7d6d3f02499f46960e2ebcff Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 5 Apr 2016 18:35:24 -0400 Subject: grsecurity: --seccomp.print --- src/firejail/seccomp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/firejail/seccomp.c b/src/firejail/seccomp.c index 43b849ecf..7108b5a05 100644 --- a/src/firejail/seccomp.c +++ b/src/firejail/seccomp.c @@ -816,9 +816,11 @@ void seccomp_print_filter_name(const char *name) { void seccomp_print_filter(pid_t pid) { EUID_ASSERT(); - + // if the pid is that of a firejail process, use the pid of the first child process + EUID_ROOT(); char *comm = pid_proc_comm(pid); + EUID_USER(); if (comm) { if (strcmp(comm, "firejail") == 0) { pid_t child; @@ -839,7 +841,6 @@ void seccomp_print_filter(pid_t pid) { } } - // find the seccomp filter EUID_ROOT(); char *fname; -- cgit v1.2.3-70-g09d2