]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: do not post-process skipped mounts
authorLuca Boccassi <bluca@debian.org>
Thu, 26 Oct 2023 13:56:58 +0000 (14:56 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 26 Oct 2023 20:15:41 +0000 (21:15 +0100)
commit63862de4b7643ac8703b9ecac59c08b0b2ba0a8e
tree47fe6387fcfeb8d05636517182875e8e54d23136
parent31cfcf50088b69c973b9335a2383fa6502d90419
core: do not post-process skipped mounts

When a mount is gracefully skipped (e.g.: BindReadOnlyPaths=-/nonexistent)
we still post-process it, like making it read-only. Except if nothing
has been mounted, the mount point will be made read-only for no reason.
Track when mounts are skipped and avoid post-processing.

One day we'll switch all of this to the new mount api and do these
operations atomically or not at all.

Fixes https://github.com/systemd/systemd/issues/29725
src/core/namespace.c
test/units/testsuite-07.exec-context.sh