From cc6819c69db7ed6282367479a9a5513a6d992712 Mon Sep 17 00:00:00 2001 From: Jef Steelant Date: Wed, 11 Oct 2023 09:56:58 +0000 Subject: [PATCH] reset root_nsuid_map and root_nsgid_map when idmaps is cleared Signed-off-by: Jef Steelant --- src/lxc/conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index b900089fc4..9c2d6b66a9 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4577,6 +4577,8 @@ define_cleanup_function(struct list_head *, __lxc_free_idmap); int lxc_clear_idmaps(struct lxc_conf *c) { + c->root_nsuid_map = NULL; + c->root_nsgid_map = NULL; return lxc_free_idmap(&c->id_map); }