]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: all hooks should be arrays of objects, not just objects
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 15 May 2023 17:44:15 +0000 (19:44 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 16 May 2023 09:27:10 +0000 (11:27 +0200)
See: https://github.com/opencontainers/runtime-spec/blob/v1.0.0/config.md#posix-platform-hooks

src/nspawn/nspawn-oci.c

index 2b1fae0df4b2a76cdc20a87e22d36e103c1197c1..ae733139a4b9dc5f71b8879c59fd258b8e92826a 100644 (file)
@@ -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 },
                 {}
         };