]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: introduce exec_context_with_rootfs_strict() as a stricter version of exec_conte...
authorLennart Poettering <lennart@amutable.com>
Tue, 17 Feb 2026 14:46:45 +0000 (15:46 +0100)
committerLennart Poettering <lennart@amutable.com>
Thu, 19 Feb 2026 14:05:15 +0000 (15:05 +0100)
commit087f2ec34410061216a91a3a00987a73ec504e44
tree638014b2c6d923802ea1710b3c1f00521222c62c
parent6d327e9fddbf048958f70d36081dc0fe70e03ee6
core: introduce exec_context_with_rootfs_strict() as a stricter version of exec_context_with_rootfs()

We have two very similar checks in place: in some contexts we want to
know if *any* RootDirectory= is configured, in the other we want to
suppress if it is configured to our regular root. Let's add a helper for
both (even if we only need it once), to make the mirrored behaviour
clear.
src/core/exec-invoke.c
src/core/execute.c
src/core/execute.h