Commit Graph

573 Commits

Author SHA1 Message Date
Richard Hughes
31907e6863 Add a sanity check when trying to refresh a non-download remote 2022-04-25 15:47:20 +01:00
Richard Hughes
7eca2b2b16 Export the version_lowest_raw value correctly 2022-04-23 10:28:16 +01:00
Richard Hughes
3b0d1a6c6b trivial: Ignore the return value of curl_easy_setopt() in most cases
This makes Coverity happy.
2022-04-13 15:08:12 +01:00
Richard Hughes
0b7af7d54b trivial: Ignore the return value of setenv() in most cases
This makes Coverity happy.
2022-04-13 15:08:12 +01:00
Mario Limonciello
7526d1b183 Add a new attribute for fused platform
Fused parts are unable to be tampered with.
2022-04-12 10:39:02 -05:00
Mario Limonciello
0e3e8ff610 trivial: change Intel debug attributes to generic
As other platforms have features with the same attribute, remove
the Intel generic one.
2022-04-12 10:39:02 -05:00
Mario Limonciello
9adb5380b3 Add a new HSI attributes for SPI protections 2022-04-12 10:39:02 -05:00
Mario Limonciello
04efb0b0cb Add a new HSI attribute for AMD rollback protection
This will be used by an upcoming AMD plugin
2022-04-12 10:39:02 -05:00
Sergii Dmytruk
4795ab3122 trivial: libfwupd,libfwupdplugin: fix typos in several comments
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2022-04-11 15:31:03 +01:00
Richard Hughes
f595b39f39 Add InstanceIds to the JSON device dump
Fixes https://github.com/fwupd/fwupd/issues/4501
2022-04-07 13:17:00 +01:00
Richard Hughes
06ddcc413a trivial: Fix a docgen warning on release build 2022-04-04 13:05:19 +01:00
Mario Limonciello
26349d0f28 cpu: Add a new attribute for CPU supported by HSI
On supported CPUs this will show up at HSI level 1 meaning that HSI
should be supported and trusted on this CPU if all plugins provided
enough data.

On non-Intel CPUs this will show up as missing data, meaning
that not enough plugins provide data for HSI to be trusted by default.
2022-04-03 09:06:00 -05:00
Mario Limonciello
2f086c2bbc Add a new security attribute flag of "missing data"
This attribute flag will be used to determine whether or not enough
data has been provided to make a security level calculation.
2022-04-03 09:06:00 -05:00
Mario Limonciello
a93feda72b trivial: rename the DMAR attribute to be vendor agnostic
The DMAR attribute is for Intel only, but AMD has the same feature in
the IVRS table.  Rename the attribute to clarify this.
2022-04-03 09:05:49 -05:00
Richard Hughes
dd3fc46786 trivial: Add some missing g_return_val_if_fail() calls 2022-03-29 20:04:26 +01:00
Richard Hughes
ce762c1d08 trivial: Use the correct struct offset for device requests 2022-03-28 15:08:16 +01:00
Richard Hughes
897c6a47fa libfwupd: Add a FwupdRelease:remote-id property 2022-03-25 21:13:37 +00:00
Richard Hughes
17c04e9824 Show the update message and update image in front end tools
We actually need to include the update image and message when creating
the GVariant.
2022-03-24 15:54:12 +00:00
Richard Hughes
945002f7a3 Fix build for MacOS
This is more for curiosity than anything else.
2022-03-15 14:37:28 +00:00
Richard Hughes
d3cba9a679 Add fwupd_client_disconnect() for future usage 2022-03-11 13:28:00 +00:00
Crag Wang
a2b46e15cf Add daemon configuration 'OnlyTrusted' to D-Bus properties 2022-03-10 09:46:54 +00:00
Richard Hughes
91512925a0 Check for os-release on FWUPD_SYSCONFDIR
Change-Id: I391eabfb1ef6eadbad100273445794172b2cb1fd

Fixes https://github.com/fwupd/fwupd/issues/4366

Based on a patch by Daniel Campello <campello@chromium.org>, many thanks.
2022-03-09 08:10:18 -07:00
Richard Hughes
4ce9972ce5 trivial: Don't leak the string even on critical failure
Not totally sure this is worthwhile, but it triggered a failure in the
RHEL tests we do - and it's less work to fix it than argue.
2022-03-08 16:01:16 +00:00
Mario Limonciello
6896e0ab52 trivial: switch from meson.source_root to meson.project_source_root
The former is deprecated in meson 0.56 or later.
2022-02-28 08:34:48 -06:00
Mario Limonciello
661990ed98 Convert build system to use meson tristate features
tristate features will automatically disable if dependencies marked
as required are missing.

Packagers can manually override using `auto_features`.

Link: https://mesonbuild.com/Build-options.html#features
2022-02-28 08:34:48 -06:00
Richard Hughes
758d5d8c6f Add a flag to indicate the device is signed or unsigned
Devices without either flag are unknown.
2022-02-22 19:12:06 +00:00
Richard Hughes
f63080fbe2 Allow assigning issues to devices
This allows us to show in the tools if a device is currently affected
by a specific CVE. For instance, we could inform the user that a device
requires a critical firmware update that is being actively exploited.

Note, this also means we can show the user a firmware update is now
required, even though the firmware may not be available on the LVFS.

Also show the issue in the `fwupdmgr security` output, e.g.

    There are devices with issues:
      Samsung — MZVLB2T0HALB-000L7:
       • CVE-2022-12345
       • CVE-2022-54321
2022-02-16 14:50:29 +00:00
Richard Hughes
31dacb8687 Allow marking a device as EOL
This probably means it is unlikely to get any new security updates.
2022-02-07 16:03:44 +00:00
Richard Hughes
bb1bcce863 Allow fwupd to operate without a D-Bus daemon
This adds support for optionally using a UNIX domain socket where a
D-Bus daemon may not be running.

To use this, launch the daemon and clients with something like
`FWUPD_DBUS_SOCKET=/var/run/fwupd.sock fwupdmgr get-devices`
2022-01-31 14:05:23 +00:00
Richard Hughes
6eada0e067 Add a flag to indicate the firmware is not provided by the vendor
Also, force the user to accept this warning for every update.
2022-01-25 10:13:40 +00:00
Richard Hughes
3917714dd1 redfish: Change an expired password when required 2022-01-19 21:19:01 +00:00
Richard Hughes
c725e42e34 trivial: Fix various const issues 2022-01-03 22:46:23 +00:00
Richard Hughes
e17a107ce1 trivial: Cast the g_signal_connect() object to allow static analysis
This is useful when using https://gitlab.freedesktop.org/tartan/tartan
2022-01-03 22:46:23 +00:00
Richard Hughes
c4590f2f25 trivial: Add some missing g_return_val_if_fail() calls 2022-01-03 22:46:23 +00:00
Richard Hughes
2e99055d1e trivial: Add some more annotations for language bindings 2022-01-03 22:46:23 +00:00
Richard Hughes
3356d8a844 trivial: Add fwupd_device_get_root() for GUI use 2021-12-17 16:44:57 +00:00
Richard Hughes
cb110b55f8 trivial: Fix regression from 9f94dc9 on Ubuntu Focal 2021-12-17 12:19:39 +00:00
Richard Hughes
9f94dc97c4 trivial: Handle old JSON-Glib more gracefully
Fixes https://github.com/fwupd/fwupd/issues/4099
2021-12-16 19:29:49 +00:00
Mario Limonciello
27ac4f1fc2 trivial: libfwupd: correct building URI path
when run on Windows the following is emitted:

```
changing metadata URI from https://cdn.fwupd.org/downloads/firmware.xml.gz to
https://cdn.fwupd.org/downloads\firmware-02681-stable.xml.gz
```
2021-12-15 06:46:27 -06:00
Richard Hughes
3822422b1e trivial: Workaround two false 'unused' warnings from clang 2021-12-10 16:00:07 +00:00
Richard Hughes
beb29ff698 Add a sync-bkc subcommand to ensure a known set of firmware versions
Install or downgrade firmware on all devices to make the system match
a well known set. This allows two things:

 * Factory recovery where a device in the field has been upgraded
 * Ensuring a consistent set of tested firmware for a specific workload

A tag is assigned either during upload or added post-upload on the LVFS
which is included in the metadata. A single firmware can be marked with
multiple tags, and tags can be duplicated for different firmwares.
2021-11-29 15:16:14 +00:00
Richard Hughes
4fe8a36729 Add support for LVFS component tags
These allow us to tag components as being part of a set, e.g. a BKC.
2021-11-25 10:36:26 +00:00
Richard Hughes
6e651269ba Fix running the tests when fwupd is not installed
This probably regressed in 70f9124545 as
the callers actually expect an error in the GDBusError domain, rather
than one fixed up in the FwupdError domain.

Fixes https://github.com/fwupd/fwupd/issues/4014
2021-11-23 15:18:41 +00:00
Richard Hughes
5ebbfe7f7d Export the component release ID over DBus
This allows us to map a specific component on the LVFS without guessing
by using the generated checksum.
2021-11-19 06:55:53 +00:00
Gabriel Kerneis
3e8f09a0f7 Add HSI check that PCR registers 0-7 are not empty
Some BIOSes forget add measurements to PCR registers, which results in
all-zero checksums and breaks measured boot guarantees.

Fixes #3901
2021-11-17 16:21:52 +00:00
Richard Hughes
60612294f5 trivial: Use the device GType as the debugging root
We never show the fu_device_to_string() output to the user in normal
circumstances, and it's super useful for it to match the FuFirmware
format.
2021-11-15 14:59:52 +00:00
Richard Hughes
b87a909223 trivial: Do not show a critical warning is LANG is unset 2021-11-12 15:26:31 +00:00
Richard Hughes
4d63d4ad7c Use g_subprocess_communicate() to fix IPFS downloads
Since switching to a custom GMainContext we broke reading the stream of
the GSubprocess.
2021-11-09 09:22:18 +00:00
Richard Hughes
09b946cb40 trivial: Fix ctrl+c when downloading with IPFS 2021-11-09 09:22:18 +00:00
Richard Hughes
5e895b89c9 Use pre-computed namespace GUIDs to load 0.3% faster
This should also help memory fragmentation at startup too as we were
splitting a lot of very small strings.
2021-11-03 21:51:45 +00:00