]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: allow to run unpriv from dir
authorLennart Poettering <lennart@poettering.net>
Mon, 11 Nov 2024 16:09:06 +0000 (17:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Jan 2025 20:48:02 +0000 (21:48 +0100)
commit88252ca88932b733ead989b6c5cece22ea37941b
tree5cec95af773a704227684d2d619cf2245765a5ec
parente57f99305e9ae75848861b6b61cd04eeb82a5f4d
nspawn: allow to run unpriv from dir

This simply calls into mountfsd to acquire the root mount and uses it as
root for the container.

Note that this also makes one more change: previously we ran containers
directory off their backing directory. Except when we didn't, and there
were a variety of exceptions: if we had no privs, if we ran off a disk
image, if the directory was the host's root dir, and some others.

This simplifies the logic a bit: we now simply always create a temporary
directory in /tmp/ and bind mount everything there, in all code paths.
This simplifies our code a bit. After all, in order to control
propagation we need to turn the root into a mount point anyway, hence we
might just do it at one place for all cases.
src/nspawn/nspawn.c