From 96ba58adefc472b28b4cc28e5656b520c69af786 Mon Sep 17 00:00:00 2001 From: Ma Shimiao Date: Tue, 14 Feb 2017 15:15:40 +0800 Subject: [PATCH] schema/config-linux: add length limit for idmappings According to spec, there is a limit of 5 mappings which is the Linux kernel hard limit. Signed-off-by: Ma Shimiao --- schema/config-linux.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schema/config-linux.json b/schema/config-linux.json index f74f243e5..693ec8d55 100644 --- a/schema/config-linux.json +++ b/schema/config-linux.json @@ -14,6 +14,8 @@ "uidMappings": { "id": "https://opencontainers.org/schema/bundle/linux/uidMappings", "type": "array", + "minItems": 0, + "maxItems": 5, "items": { "$ref": "defs.json#/definitions/IDMapping" } @@ -21,6 +23,8 @@ "gidMappings": { "id": "https://opencontainers.org/schema/bundle/linux/gidMappings", "type": "array", + "minItems": 0, + "maxItems": 5, "items": { "$ref": "defs.json#/definitions/IDMapping" }