Skip to content

Commit

Permalink
bootloader/zipl: No-op if run as non-root
Browse files Browse the repository at this point in the history
Closes: #3084

Not the most elegant fix but should get the job done.
  • Loading branch information
cgwalters committed Oct 24, 2023
1 parent cfb63b8 commit 75c7e51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libostree/ostree-bootloader-zipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,12 @@ _ostree_bootloader_zipl_post_bls_sync (OstreeBootloader *bootloader, int bootver
{
OstreeBootloaderZipl *self = OSTREE_BOOTLOADER_ZIPL (bootloader);

// This can happen in a unit testing environment; at some point what we want to do here
// is move all of the zipl logic to a systemd unit instead that's keyed of
// ostree-finalize-staged.service.
if (getuid () != 0)
return TRUE;

/* Note that unlike the grub2-mkconfig backend, we make no attempt to
* chroot().
*/
Expand Down

0 comments on commit 75c7e51

Please sign in to comment.