]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: Bind mount notify socket to /run/host/notify in sandboxed units (#35573)
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 13 Dec 2024 13:48:07 +0000 (13:48 +0000)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2024 13:48:07 +0000 (13:48 +0000)
commit18bb30c3b2ea7f4497edf86414133667b3e155fe
treeb6d7331de892d531920c4e6337de6ff478cb00ed
parented803ee195e92876b745867ec81e393020597ff9
parent284dd31e9d7d25e8a0bdfee60cf938ab961f2a7a
core: Bind mount notify socket to /run/host/notify in sandboxed units (#35573)

To be able to run systemd in a Type=notify transient unit, the notify
socket can't be bind mounted to /run/systemd/notify as systemd in the
transient unit wants to use that as its own notify socket which
conflicts with systemd on the host.

Instead, for sandboxed units, let's bind mount the notify socket to
/run/host/notify as documented in the container interface. Since we
don't guarantee a stable location for the notify socket and insist users
use $NOTIFY_SOCKET to get its path, this is safe to do.
src/core/exec-invoke.c
src/core/namespace.c
src/core/namespace.h
test/units/TEST-50-DISSECT.dissect.sh