summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorFelipe Sateler <fsateler@users.noreply.github.com>2016-08-22 16:40:58 -0300
committerEvgeny Vereshchagin <evvers@ya.ru>2016-08-22 22:40:58 +0300
commit83f12b27d14853e7c89a326f7cd31a6c739d378e (patch)
treea422aeadd910a844174690dea8e415069e799470 /src/core/main.c
parent05b4d3b55c0a60aa17817d51129f2bc83914c1f4 (diff)
core: do not fail at step SECCOMP if there is no kernel support (#4004)
Fixes #3882
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 125cfb28f0..7d8322ebd8 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -72,6 +72,9 @@
#include "process-util.h"
#include "raw-clone.h"
#include "rlimit-util.h"
+#ifdef HAVE_SECCOMP
+#include "seccomp-util.h"
+#endif
#include "selinux-setup.h"
#include "selinux-util.h"
#include "signal-util.h"
@@ -1186,6 +1189,9 @@ static int enforce_syscall_archs(Set *archs) {
void *id;
int r;
+ if (!is_seccomp_available())
+ return 0;
+
seccomp = seccomp_init(SCMP_ACT_ALLOW);
if (!seccomp)
return log_oom();