When removing cgroups we can't always use the minimal idmap if the user has
specified a specific map for the container instead of just a simple one.
Execute cgroup removal under the full map.
Fixes: https://github.com/lxc/lxd/issues/11108
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
.hierarchies = ops->hierarchies,
.origuid = 0,
};
- ret = userns_exec_1(handler->conf, cgroup_tree_remove_wrapper,
- &wrap, "cgroup_tree_remove_wrapper");
+ ret = userns_exec_full(handler->conf, cgroup_tree_remove_wrapper,
+ &wrap, "cgroup_tree_remove_wrapper");
} else {
ret = cgroup_tree_remove(ops->hierarchies, ops->container_limit_cgroup);
}