]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: Add RootDirectoryFileDescriptor= (#39480)
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 31 Oct 2025 21:30:46 +0000 (22:30 +0100)
committerGitHub <noreply@github.com>
Fri, 31 Oct 2025 21:30:46 +0000 (22:30 +0100)
RootDirectory= but via a open_tree() file descriptor. This allows
setting up the execution environment for a service by the client in a
mount namespace and then starting a transient unit in that execution
environment using the new property.

We also add --root-directory= and --same-root-dir= to systemd-run to
have it run services within the given root directory. As systemd-run
might be invoked from a different mount namespace than what systemd is
running in, systemd-run opens the given path with open_tree() and then
sends it to systemd using the new RootDirectoryFileDescriptor= property.

1  2 
src/core/exec-invoke.c

Simple merge