]> git.ipfire.org Git - thirdparty/systemd.git/commit
dissect-image: set MS_NOSYMFOLLOW for ESP/XBOOTLDR
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Mar 2023 09:18:09 +0000 (10:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 9 Mar 2023 20:56:42 +0000 (21:56 +0100)
commit254e392e73bd47ebc85b651bc9a91b53e987d1ae
tree1cd40493825d72a6ade6890db7e6cd71748912cd
parentc571dee74bf5bea67bbe94e3734d19b1092765dd
dissect-image: set MS_NOSYMFOLLOW for ESP/XBOOTLDR

When we mount a DDI, let's set MS_NOSYMFOLLOW for ESP/XBOOTLDR. They are
generally untrusted territory, (i.e. outside of
encryption/authentication via dm-crypt/dm-verity). Moreover they are
generally FAT, where symlinks don't exist anyway. Let's hence disable
symlinks for them.

This slightly refactors how we put together mount options for mounts,
splitting this out into a new helper call
dissected_partition_pick_options(), which we should be able to reuse
later in gpt-auto-generator, to ensure mounts via loopback as DDI and
those on bare metal get the same options.
src/shared/dissect-image.c
src/shared/dissect-image.h