]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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)
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.

1  2 
src/core/exec-invoke.c
src/core/namespace.c
src/core/namespace.h
test/units/TEST-50-DISSECT.dissect.sh

Simple merge
Simple merge
Simple merge
Simple merge