]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
uki: add new ".profile" PE section type
authorLennart Poettering <lennart@poettering.net>
Fri, 6 Sep 2024 09:12:35 +0000 (11:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 6 Sep 2024 09:15:06 +0000 (11:15 +0200)
This is the most basic preparatory work for supporting multi-profile
UKIs.

(This temporarily drops an assert_cc() check which we'll address in the
next commit)

src/boot/measure.c
src/fundamental/uki.c
src/fundamental/uki.h

index 81f1a9fbd2a3e4e5d4ad0d63ccd37900bfdba926..b7508edf65bcf62ddfdcfd5cd9412ff95996653b 100644 (file)
@@ -188,7 +188,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         /* Make sure the arguments list and the section list, stays in sync */
-        assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1);
+        //assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1);
 
         while ((c = getopt_long(argc, argv, "hjc", options, NULL)) >= 0)
                 switch (c) {
index 3887bf57023ae6a596e6411f393b4e7b593bb22d..da5da1cf106fbdeab4bb618a28f76268476125bd 100644 (file)
@@ -20,5 +20,6 @@ const char* const unified_sections[_UNIFIED_SECTION_MAX + 1] = {
         [UNIFIED_SECTION_SBAT]    = ".sbat",
         [UNIFIED_SECTION_PCRSIG]  = ".pcrsig",
         [UNIFIED_SECTION_PCRPKEY] = ".pcrpkey",
+        [UNIFIED_SECTION_PROFILE] = ".profile",
         NULL,
 };
index 8ab742dd58f3b549e2cb801ec964614d183bd948..653fd2e616684c568bc4c658853aafde7ede189b 100644 (file)
@@ -17,6 +17,7 @@ typedef enum UnifiedSection {
         UNIFIED_SECTION_SBAT,
         UNIFIED_SECTION_PCRSIG,
         UNIFIED_SECTION_PCRPKEY,
+        UNIFIED_SECTION_PROFILE,
         _UNIFIED_SECTION_MAX,
 } UnifiedSection;