From 625dbee88e746a5cff0b54abd4556441c0d71c80 Mon Sep 17 00:00:00 2001 From: zhangsong34 Date: Tue, 17 Mar 2020 21:38:43 +0800 Subject: [PATCH] iSulad: fix seccomp configure for syscontainer Signed-off-by: zhangsong34 --- src/services/execution/spec/specs_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/execution/spec/specs_security.c b/src/services/execution/spec/specs_security.c index d471a39..c940daa 100644 --- a/src/services/execution/spec/specs_security.c +++ b/src/services/execution/spec/specs_security.c @@ -1010,8 +1010,8 @@ int adapt_settings_for_system_container(oci_runtime_spec *oci_spec, const host_c ERROR("Failed to parse security opt"); goto out; } - /* do not append to seccomp if seccomp profile is NULL or unconfined */ - if (seccomp_profile == NULL || strcmp(seccomp_profile, "unconfined") == 0) { + /* do not append to seccomp if seccomp profile unconfined */ + if (seccomp_profile != NULL && strcmp(seccomp_profile, "unconfined") == 0) { goto out; }