Commit Graph

16 Commits

Author SHA1 Message Date
Mario Limonciello
b87d48a042 When TPM PCR0 measurements fail, query if secure boot is available and enabled
If the measurements are missing but it's a UEFI system, it's a good indication
that the user has secure boot turned off.
Notify the user on the UEFI device through a non-fatal `UpdateMessage`

To accomplish this, move fu-uefi-vars into the plugin library for other plugins to use
2020-03-05 07:54:15 -06:00
Richard Hughes
668ee21567 trivial: Use prefixes for DATADIR in config.h for portability
DATADIR is an enumerated type in MinGW, and the other names are very generic.
2019-11-24 14:17:38 -06:00
Richard Hughes
01c0badd38 trivial: Allow compiling without getuid() 2019-11-23 17:07:53 +00:00
Mario Limonciello
44b9e46d37 uefi: rework ESP path detection and lifecycle
This makes the daemon less destructive at startup, especially if the ESP
is not mounted.

It's stored in 3 different places right now, so move it into one point of truth.

Now the ESP is detected when needed including all point of time safety checks and
dynamically mounted and unmounted if necessary.
2019-10-24 15:22:01 -05:00
Mario Limonciello
5bd649ef31 uefi: detect unmounted ESP partitions (Fixes: #1405)
Mount these while writing out updates.
Leave them mounted when done (you gotta reboot anyway).
2019-09-26 10:39:45 -05:00
Richard Hughes
fad78a758e Allow setting custom flags when using fwupdate
This allows the ODM to specify command line arguments such as:

    --flags=use-shim-unique,use-legacy-bootmgr-desc,no-ux-capsule

..which is useful for testing broken firmware.
2019-08-02 14:34:12 +01:00
Richard Hughes
c5eb83cb87 trivial: Do not show a critical warning if no firmware is specified 2019-08-02 14:34:12 +01:00
Richard Hughes
90da72ad76 trivial: Fix overzealous search-replace action in user string 2019-08-02 14:34:12 +01:00
Richard Hughes
dfa9e11bb2 Allow handling FORCE for devices that subclass FuDevice
Pass FwupdInstallFlags down to the vfunc to allow us to check the flags when
parsing the firmware and updating the device.
2019-05-05 15:29:00 -05:00
Richard Hughes
cdd390a785 trivial: Fix fwupdate --apply 2019-04-25 12:52:59 +01:00
Richard Hughes
a0da340b60 uefi: Do not add devices with invalid GUIDs
Note: We deliberately don't add the device without 'UPDATABLE' as there's
nothing the user can actually do to repair this themselves.
2018-12-07 09:05:30 -06:00
Richard Hughes
ccd3b2a61f uefi: Check the amount of free space on the ESP
Fixes https://github.com/hughsie/fwupd/issues/670
2018-09-12 13:56:02 +01:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Richard Hughes
99b0b1be04 uefi: Check the user-supplied ESP path
Additionally, if the user specified something invalid, do not autodetect the
ESP but return with a journal error. It seems wrong to ignore what the user
explicitly set and perhaps do something dangerous.

Alternative to https://github.com/hughsie/fwupd/pull/599
2018-08-08 20:35:04 +01:00
Richard Hughes
7ecf0164de uefi: Show the stored capsule filename in fwupdate 2018-06-28 15:51:11 +01:00
Richard Hughes
57df956d7b uefi: Add a libexec tool to mimic the original fwupdate CLI interface 2018-06-28 15:51:11 +01:00