Page MenuHomeFreeBSD

efibootmgr: provide explicit error message if run as non-root
ClosedPublic

Authored by emaste on Oct 15 2023, 5:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 25 2024, 9:02 AM
Unknown Object (File)
May 24 2024, 7:22 PM
Unknown Object (File)
May 24 2024, 4:15 PM
Unknown Object (File)
Mar 21 2024, 1:19 PM
Unknown Object (File)
Mar 9 2024, 3:58 PM
Unknown Object (File)
Jan 23 2024, 9:00 PM
Unknown Object (File)
Jan 11 2024, 2:45 AM
Unknown Object (File)
Jan 4 2024, 6:37 PM
Subscribers
None

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.
imp added inline comments.
usr.sbin/efibootmgr/efibootmgr.c
1107

This works...

I'd also looked at machdep.bootmethod, but then discovered that's not on all UEFI-supporting systems and that's why I never finished up the patches.

This revision is now accepted and ready to land.Oct 15 2023, 5:25 PM
usr.sbin/efibootmgr/efibootmgr.c
1107

Though thinking about it, arm and arm64 both require UEFI (effectively), though arm64 can get its device tree from fdt.
Riscv64 might also require it, but I'm way less sure about that. It's rare enough we needn't optimize it yet.
Either way, we'd cover the vast majority of cases if we added an

#ifdef amd64
/* code here to get machdep.bootmethod and compare against UEFI and say BIOS not supported instead */
#endif
errx(1, "efi variables not supported...");