Skip to content

Commit

Permalink
systemd-boot: Allow key enroll in AuditMode
Browse files Browse the repository at this point in the history
Since AuditMode automatically switches SetupMode on, it should be
authorized to enroll SecureBoot keys.

Signed-off-by: Nicolas Bouchinet <nicolas.bouchinet@ssi.gouv.fr>
(cherry picked from commit a23a59b)
  • Loading branch information
nbouchinet-anssi authored and keszybz committed May 8, 2024
1 parent 6e778d4 commit 04f6566
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/boot/efi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2466,7 +2466,7 @@ static EFI_STATUS secure_boot_discover_keys(Config *config, EFI_FILE *root_dir)
EFI_STATUS err;
_cleanup_(file_closep) EFI_FILE *keys_basedir = NULL;

if (secure_boot_mode() != SECURE_BOOT_SETUP)
if (!IN_SET(secure_boot_mode(), SECURE_BOOT_SETUP, SECURE_BOOT_AUDIT))
return EFI_SUCCESS;

/* the lack of a 'keys' directory is not fatal and is silently ignored */
Expand Down

0 comments on commit 04f6566

Please sign in to comment.