]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/dissect-image.c
dissect: let's check for crypto_LUKS before fstype allowlist check
authorLennart Poettering <lennart@poettering.net>
Thu, 20 Apr 2023 09:14:50 +0000 (11:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 20 Apr 2023 11:39:28 +0000 (13:39 +0200)
commit14ce246771a72c7e0e493375016030b0bcbc15fc
tree6da65312aefcebde38b16ee22c1f2a341ac774d5
parented6a6bac45e2674d5834510390cb2e5121bbb444
dissect: let's check for crypto_LUKS before fstype allowlist check

When trying to mount a partition that is encrypted without the
encryption first having been set up we want to return a
recognizable error (EUNATCH). This was broken by
80ce8580f5aa6b03fa13a0b3b30207bc9b5c5fe0 which added an allowlist check
for permissible file systems first. Let's reverse the check order, so
that we get EUNATCH again, as before. (And leave EIDRM as error for the
failed allowlist check).
src/shared/dissect-image.c