From: Frantisek Sumsal Date: Mon, 15 May 2023 17:44:15 +0000 (+0200) Subject: nspawn: all hooks should be arrays of objects, not just objects X-Git-Tag: v254-rc1~464^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3590d95b2b18e5a12ff1a3a4e037423e879dbaa1;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c index 2b1fae0df4b..ae733139a4b 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 }, {} };