From: Noel Georgi Date: Fri, 27 Dec 2024 11:50:41 +0000 (+0530) Subject: fix: sd-measure `dtbauto` and `hwdids` arg parsing X-Git-Tag: v258-rc1~1741 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ad1fd7a80e0f1877b1cb0048de477e18170422a;p=thirdparty%2Fsystemd.git fix: sd-measure `dtbauto` and `hwdids` arg parsing Commit 630cf4e7dafb062588a2d9e09cf470806f00bb9e introduced `.dtbauto`, but since it's before `.hwdids` commit 4c0b7f425024923f37c7e571fa563f602e8bf369 made `dtbauto` the last argument whereas it should have been `hwdids`. Otherwise the code was measuring the content of hwdids into dtbauto section and vice-versa. Found this while adding the new `dtbauto` and `.hwdids` fields in the go implementation of `sd-measure` at https://github.com/siderolabs/talos/blob/main/internal/pkg/secureboot/measure/measure.go. Signed-off-by: Noel Georgi --- diff --git a/src/measure/measure.c b/src/measure/measure.c index 18461797b7e..fceca7c4a11 100644 --- a/src/measure/measure.c +++ b/src/measure/measure.c @@ -158,9 +158,9 @@ static int parse_argv(int argc, char *argv[]) { _ARG_PCRSIG, /* the .pcrsig section is not input for signing, hence not actually an argument here */ ARG_PCRPKEY, ARG_PROFILE, - ARG_HWIDS, + ARG_DTBAUTO, _ARG_SECTION_LAST, - ARG_DTBAUTO = _ARG_SECTION_LAST, + ARG_HWIDS = _ARG_SECTION_LAST, ARG_BANK, ARG_PRIVATE_KEY, ARG_PRIVATE_KEY_SOURCE,