1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

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-15 19:44:15 +02:00
parent e5c275fedc
commit 3590d95b2b

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 },
{}
};