summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-05-15 19:44:15 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-05-16 11:27:10 +0200
commit3590d95b2b18e5a12ff1a3a4e037423e879dbaa1 (patch)
tree67007222755dd6f0f5759a38570524ae17ed4554
parente5c275fedc0ab416730fe288a8754a20a014e200 (diff)
downloadsystemd-3590d95b2b18e5a12ff1a3a4e037423e879dbaa1.tar.gz
nspawn: all hooks should be arrays of objects, not just objects
See: https://github.com/opencontainers/runtime-spec/blob/v1.0.0/config.md#posix-platform-hooks
-rw-r--r--src/nspawn/nspawn-oci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c
index 2b1fae0df4..ae733139a4 100644
--- a/src/nspawn/nspawn-oci.c
+++ b/src/nspawn/nspawn-oci.c
@@ -2100,9 +2100,9 @@ static int oci_hooks_array(const char *name, JsonVariant *v, JsonDispatchFlags f
static int oci_hooks(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata) {
static const JsonDispatch table[] = {
- { "prestart", JSON_VARIANT_OBJECT, oci_hooks_array, 0, 0 },
- { "poststart", JSON_VARIANT_OBJECT, oci_hooks_array, 0, 0 },
- { "poststop", JSON_VARIANT_OBJECT, oci_hooks_array, 0, 0 },
+ { "prestart", JSON_VARIANT_ARRAY, oci_hooks_array, 0, 0 },
+ { "poststart", JSON_VARIANT_ARRAY, oci_hooks_array, 0, 0 },
+ { "poststop", JSON_VARIANT_ARRAY, oci_hooks_array, 0, 0 },
{}
};