From 3590d95b2b18e5a12ff1a3a4e037423e879dbaa1 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 15 May 2023 19:44:15 +0200 Subject: 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 --- src/nspawn/nspawn-oci.c | 6 +++--- 1 file 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 }, {} }; -- cgit v1.2.1