From d2abe476898702b1d2a2e1f114c8b020e4d38d03 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 10 Mar 2026 14:13:11 -0700 Subject: [PATCH] libct/configs: exclude Relabel from json [un]marshaling When deprecating Relabel field, its json attributes were mistakenly removed, so now it is: - saved to JSON under "Relabel" (rather than "relabel"); - won't be ignored if empty. Let's fix it before it's too late. Fixes: 8b2b5e94 ("libct: remove relabeling dead code") Signed-off-by: Kir Kolyshkin --- libcontainer/configs/mount_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/configs/mount_linux.go b/libcontainer/configs/mount_linux.go index 8417da316c0..6db1b3918fc 100644 --- a/libcontainer/configs/mount_linux.go +++ b/libcontainer/configs/mount_linux.go @@ -46,7 +46,7 @@ type Mount struct { // Relabel field is ignored. // // Deprecated: do not use. This field will be removed in runc 1.7. - Relabel string + Relabel string `json:"-"` // RecAttr represents mount properties to be applied recursively (AT_RECURSIVE), see mount_setattr(2). RecAttr *unix.MountAttr `json:"rec_attr,omitempty"`