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
Not the most elegant fix but should get the job done.

Bug: ostreedev/ostree#3084
Origin: upstream, 2023.8, commit:75c7e51a8bedb5edeadb9f54e84ccfff2adcc755

Gbp-Pq: Name bootloader-zipl-No-op-if-run-as-non-root.patch
  • Loading branch information
cgwalters authored and smcv committed Nov 6, 2023
1 parent 6dee866 commit cbb1ba6
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 cbb1ba6

Please sign in to comment.