dissect-image: optionally, reference dissected partition device nodes by diskseq
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Dec 2022 11:26:21 +0000 (12:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Dec 2022 11:44:57 +0000 (12:44 +0100)
commit1a81ddef00a0a25f6bcdd1e6633430e8b240b87f
treedac52f840e5f7518b9b40704bc77762be7ad6a8a
parenta559088671cd7d98417913496318d97b954b8ba1
dissect-image: optionally, reference dissected partition device nodes by diskseq

This is useful to make the dissection logic at boot a bit safer, as we
can reference device nodes by diskseq.

This locks down dissection a bit, since it makes it harder to swap out
the backing device between the time we dissected and validated it, until
we actually mounted it.

This is not complete though, as /bin/mount would have to verify the
diskseq after opening the diskseq symlink again.

See: https://github.com/util-linux/util-linux/issues/1786
src/shared/dissect-image.c
src/shared/dissect-image.h