mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
Let's reduce our attack surface by insisting that XBOOTLDR is vfat when auto-probing, just like we do for the ESP. Given neither can realistically be integrity protected (because firmware needs to access them) let's insist on a vfat which has a much smaller attack surface, and one we have to accept (for now) anyway, given that the ESP must be VFAT. This only applies to auto-probing of course. If people mount things explicitly via fstab none of this matters. But we really shouldn't automount a btrfs/xfs/ext4 partition as XBOOTLDR just because it looks like one, as that would really defeat our otherwise possibly very strict image policies. This also introduces a new env var $SYSTEMD_DISSECT_FSTYPE_<DESIGNATOR> environment variable that may override this hardcoding. This is in particular useful in our testcases, since various actually do use ext4 as XBOOTLDR case. The tests are updated to make use of the new env var, both as a mechanism to test this and to keep the tests working.