diff options
-rw-r--r-- | src/firejail/seccomp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/firejail/seccomp.c b/src/firejail/seccomp.c index 17930c0e8..4ede003e3 100644 --- a/src/firejail/seccomp.c +++ b/src/firejail/seccomp.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include "firejail.h" | 22 | #include "firejail.h" |
23 | #include "../include/seccomp.h" | 23 | #include "../include/seccomp.h" |
24 | 24 | ||
25 | static int err_printed = 0; | ||
26 | |||
25 | char *seccomp_check_list(const char *str) { | 27 | char *seccomp_check_list(const char *str) { |
26 | assert(str); | 28 | assert(str); |
27 | if (strlen(str) == 0) { | 29 | if (strlen(str) == 0) { |
@@ -90,7 +92,9 @@ int seccomp_load(const char *fname) { | |||
90 | .filter = filter, | 92 | .filter = filter, |
91 | }; | 93 | }; |
92 | if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog) || prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { | 94 | if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog) || prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { |
93 | fwarning("seccomp disabled, it requires a Linux kernel version 3.5 or newer.\n"); | 95 | if (!err_printed) |
96 | fwarning("seccomp disabled, it requires a Linux kernel version 3.5 or newer.\n"); | ||
97 | err_printed = 1; | ||
94 | return 1; | 98 | return 1; |
95 | } | 99 | } |
96 | 100 | ||