]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: rework how /run/host/ is set up
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Jul 2020 14:49:13 +0000 (16:49 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Jul 2020 16:47:38 +0000 (18:47 +0200)
commitd64e32c245b6710f90f746d3bf970dd17f765d4b
tree6f62e13e51482d8461a95ba91472802493e0c6f1
parent62b0ee9eb1b488e96359fa9b3f225c80e92cd082
nspawn: rework how /run/host/ is set up

Let's find the right os-release file on the host side, and only mount
the one that matters, i.e. /etc/os-release if it exists and
/usr/lib/os-release otherwise. Use the fixed path /run/host/os-release
for that.

Let's also mount /run/host as a bind mount on itself before we set up
/run/host, and let's mount it MS_RDONLY after we are done, so that it
remains immutable as a whole.
src/nspawn/nspawn-mount.c
src/nspawn/nspawn-mount.h
test/units/testsuite-13.sh