]> git.ipfire.org Git - thirdparty/systemd.git/commit
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)
commitdd15dd1a586ceed5e6b9bc6324227c09d7d4480e
tree3daee2cf1ad5cc473319b7d965ce16923cec3b6e
parent23fbaa463a1716faf339c4d16bcc63a3c0afe531
parent9e26ced9809bcac96a34dc89825cdcee4e17a078
core: Add RootDirectoryFileDescriptor= (#39480)

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.
src/core/exec-invoke.c