]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: expose the new seccomp actions in the OCI logic
authorLennart Poettering <lennart@poettering.net>
Mon, 29 Apr 2019 10:04:55 +0000 (12:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 24 May 2019 08:48:28 +0000 (10:48 +0200)
src/nspawn/nspawn-oci.c

index 97323f31dd97b9fe0542b125fab0eda3ed44c52b..b00ff289a6fceeac9b310659d450219726f19994 100644 (file)
@@ -1656,13 +1656,19 @@ static int oci_seccomp_action_from_string(const char *name, uint32_t *ret) {
                 const char *name;
                 uint32_t action;
         } table[] = {
-                { "SCMP_ACT_ALLOW", SCMP_ACT_ALLOW        },
-                { "SCMP_ACT_ERRNO", SCMP_ACT_ERRNO(EPERM) }, /* the OCI spec doesn't document the error, but it appears EPERM is supposed to be used */
-                { "SCMP_ACT_KILL",  SCMP_ACT_KILL         },
+                { "SCMP_ACT_ALLOW",         SCMP_ACT_ALLOW        },
+                { "SCMP_ACT_ERRNO",         SCMP_ACT_ERRNO(EPERM) }, /* the OCI spec doesn't document the error, but it appears EPERM is supposed to be used */
+                { "SCMP_ACT_KILL",          SCMP_ACT_KILL         },
+#ifdef SCMP_ACT_KILL_PROCESS
+                { "SCMP_ACT_KILL_PROCESS",  SCMP_ACT_KILL_PROCESS },
+#endif
+#ifdef SCMP_ACT_KILL_THREAD
+                { "SCMP_ACT_KILL_THREAD",   SCMP_ACT_KILL_THREAD  },
+#endif
 #ifdef SCMP_ACT_LOG
-                { "SCMP_ACT_LOG",   SCMP_ACT_LOG          },
+                { "SCMP_ACT_LOG",           SCMP_ACT_LOG          },
 #endif
-                { "SCMP_ACT_TRAP",  SCMP_ACT_TRAP         },
+                { "SCMP_ACT_TRAP",          SCMP_ACT_TRAP         },
 
                 /* We don't support SCMP_ACT_TRACE because that requires a tracer, and that doesn't really make sense
                  * here */