]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Follow-up fixes for #20255
authorJan Janssen <medhefgo@web.de>
Wed, 3 Aug 2022 09:05:12 +0000 (11:05 +0200)
committerJan Janssen <medhefgo@web.de>
Wed, 3 Aug 2022 09:05:12 +0000 (11:05 +0200)
man/loader.conf.xml
src/boot/efi/boot.c
src/boot/efi/secure-boot.c

index acddb193d1a222f8b386e359054a80ba16fd3e20..7aa1ed7254389602195d824e1f5237410ae076e2 100644 (file)
         and <filename>PK.esl</filename>. Note that these files need to be authenticated UEFI variables. See
         below for an example of how to generate them from regular X.509 keys.</para>
 
-        <programlisting>uuid=$(systemd-id128 new --)
+        <programlisting>uuid=$(systemd-id128 new --uuid)
 for key in PK KEK db; do
-  openssl req -new -x509 -subj "/CN=${key}/ -keyout "${key}.key" -out "${key}.crt"
+  openssl req -new -x509 -subj "/CN=${key}/" -keyout "${key}.key" -out "${key}.crt"
   openssl x509 -outform DER -in "${key}.crt" -out "${key}.cer"
   cert-to-efi-sig-list -g "${uuid}" "${key}.crt" "${key}.tmp"
 done
index db0bbab0f2b12308c2ca5f3a2b2af0a33c2e8358..87771c477dd6c669667247f28ad99a39bdbad8be 100644 (file)
@@ -2690,8 +2690,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
                 /* if auto enrollment is activated, we try to load keys for the given entry. */
                 if (entry->type == LOADER_SECURE_BOOT_KEYS && config.secure_boot_enroll != ENROLL_OFF) {
                         err = secure_boot_enroll_at(root_dir, entry->path);
-                        if (err == EFI_SUCCESS)
-                                return EFI_SUCCESS;
+                        if (err != EFI_SUCCESS)
+                                return err;
                         continue;
                 }
 
index 1da1026df5d544f7074d404dfb39fdf23924b493..aabe521eba484625a059908d4e6af486e3facf56 100644 (file)
@@ -43,7 +43,7 @@ EFI_STATUS secure_boot_enroll_at(EFI_FILE *root_dir, const char16_t *path) {
 
         clear_screen(COLOR_NORMAL);
 
-        Print(L"Enrolling secure boot keys from directory: \\loader\\keys\\%s\n"
+        Print(L"Enrolling secure boot keys from directory: %s\n"
               L"Warning: Enrolling custom Secure Boot keys might soft-brick your machine!\n",
               path);