]> git.ipfire.org Git - thirdparty/lxc.git/commit
tree-wide: use container_uses_namespace() in less trivial cases 4388/head
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Fri, 26 Jan 2024 16:20:27 +0000 (17:20 +0100)
committerAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Fri, 26 Jan 2024 16:20:27 +0000 (17:20 +0100)
commit9ac7c4895e3f8344c2f789706aca489b32039907
tree4397d8c5bdadc8d0fb6334daa35f653258554546
parent64341ce7b7b6b1eadbe65731d6074b8ac321f6c3
tree-wide: use container_uses_namespace() in less trivial cases

In our current codebase we have a logical pattern:
list_empty(&handler->conf->id_map)
*IF AND ONLY IF*
container does NOT use user namespace

Which is perfectly correct nowadays, but once we (hopefully)
get an "isolated user namespaces" stuff ready it won't be the case.
It will be perfectly fine to have a user namespace with empty
/proc/*/{u,g}id_map files. Nowadays it's also possible,
but this kind of a configuration close to useless and nobody
actually uses it.

No functional changes intended.

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
src/lxc/cgroups/cgfsng.c
src/lxc/conf.c
src/lxc/start.c