diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-05 18:35:24 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-05 18:35:24 -0400 |
commit | c95c03e2fe90893c7d6d3f02499f46960e2ebcff (patch) | |
tree | 1ff01bb6f24f813a986ac0deb0f45b61bcbc0b7e /src | |
parent | grsecurity: --caps.print (diff) | |
download | firejail-c95c03e2fe90893c7d6d3f02499f46960e2ebcff.tar.gz firejail-c95c03e2fe90893c7d6d3f02499f46960e2ebcff.tar.zst firejail-c95c03e2fe90893c7d6d3f02499f46960e2ebcff.zip |
grsecurity: --seccomp.print
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/seccomp.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) { | |||
816 | 816 | ||
817 | void seccomp_print_filter(pid_t pid) { | 817 | void seccomp_print_filter(pid_t pid) { |
818 | EUID_ASSERT(); | 818 | EUID_ASSERT(); |
819 | 819 | ||
820 | // if the pid is that of a firejail process, use the pid of the first child process | 820 | // if the pid is that of a firejail process, use the pid of the first child process |
821 | EUID_ROOT(); | ||
821 | char *comm = pid_proc_comm(pid); | 822 | char *comm = pid_proc_comm(pid); |
823 | EUID_USER(); | ||
822 | if (comm) { | 824 | if (comm) { |
823 | if (strcmp(comm, "firejail") == 0) { | 825 | if (strcmp(comm, "firejail") == 0) { |
824 | pid_t child; | 826 | pid_t child; |
@@ -839,7 +841,6 @@ void seccomp_print_filter(pid_t pid) { | |||
839 | } | 841 | } |
840 | } | 842 | } |
841 | 843 | ||
842 | |||
843 | // find the seccomp filter | 844 | // find the seccomp filter |
844 | EUID_ROOT(); | 845 | EUID_ROOT(); |
845 | char *fname; | 846 | char *fname; |