]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/dissect-image.c
dissect: try to read roothash value off user.verity.roothash xattr of image file
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Dec 2016 16:38:12 +0000 (17:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Feb 2017 11:21:29 +0000 (12:21 +0100)
commit41488e1f7acf5f4b5e11ff992a05ee1baa537d54
treeffe49f452a10501be1e500218184e32480770eaa
parent78ebe98061eb527f17691929f470f262a7ab2c8f
dissect: try to read roothash value off user.verity.roothash xattr of image file

This slightly extends the roothash loading logic to first check for a
user.verity.roothash extended attribute on the image file. If it exists,
it is used as Verity root hash and the ".roothash" file is not used.

This should improve the chance that the roothash is retained when the
file is moved around, as the data snippet is attached directly to the
image file. The field is still detached from the file payload however,
in order to make sure it may be trusted independently.

This does not replace the ".roothash" file loading, it simply adds a
second way to retrieve the data.

Extended attributes are often a poor choice for storing metadata like
this as it is usually difficult to discover for admins and users, and
hard to fix if it ever gets out of sync.  However, in this case I think
it's safe as verity implies read-only access, and thus there's little
chance of it to get out of sync.
man/systemd-nspawn.xml
src/shared/dissect-image.c