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
This commit is contained in:
Frantisek Sumsal
2023-05-16 11:27:10 +02:00
parent e5c275fedc
commit 3590d95b2b
+3 -3
View 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 },
{}
};