Commit Graph

5443 Commits

Author SHA1 Message Date
Richard Hughes
a75ef53eaf trivial: Rename the meson option for plugin_synaptics_mst 2021-01-12 21:32:12 +00:00
Richard Hughes
5c915eef1e Check the return values of g_return_val_if_fail() in CI 2021-01-12 20:31:47 +00:00
Mario Limonciello
cf9a74ec35 trivial: debian: migrate uefi->uefi_capsule in uefi.conf
Fixes: #2748
2021-01-12 13:34:11 -06:00
Mario Limonciello
797da4fc60 trivial: adjust error for no UEFI capsules
Point people towards firwmare setup instead (Fixes: #1454)
2021-01-12 12:56:05 -06:00
Дамјан Георгиевски
bb8c8040c7 rename config section in uefi_capsule.conf to plugin name
in ee2e2c3674 the plugin name was changed
from uefi to uefi_capsule. while the config file name was changed, the
section name should also be changed.

fixes #2748
2021-01-12 17:53:26 +00:00
Richard Hughes
66d0eadfa5 Show a console warning if the system clock is not set
If the date is wrong, the SSL certificate may not be in a valid date range and
the user gets a rather unhelpful 'SSL handshake failed' error message.

Detect the most common case and show a warning when starting fwupdmgr.

Fixes https://github.com/fwupd/fwupd/issues/2723
2021-01-12 16:55:21 +00:00
Richard Hughes
c8b259c923 trivial: Use shellcheck to check for bash errors 2021-01-12 16:54:37 +00:00
Richard Hughes
679a95f989 trivial: Remove unused bash script 2021-01-12 16:54:37 +00:00
Richard Hughes
5f31395fcf trivial: Remove unused variable spotted by shellcheck 2021-01-12 16:54:37 +00:00
Ilya Guterman
8fa65d98a5 stm-dfu: fix dnload wBlockNum wraparound 2021-01-11 16:50:50 +00:00
Richard Hughes
96c079d9f0 trivial: post release version bump 2021-01-11 10:20:48 +00:00
Richard Hughes
bea7665c81 Release fwupd 1.5.5 2021-01-11 10:16:43 +00:00
Richard Hughes
7a9d9e3aa3 trivial: Fix a critical warning when updating ColorHug 2021-01-11 09:44:26 +00:00
Richard Hughes
6ed25f557c Never iterate the global default main context 2021-01-11 09:13:46 +00:00
Richard Hughes
9047aaccd4 trivial: Actually emit progress events
CURLOPT_NOPROGRESS defaults to 1L...
2021-01-10 16:25:42 +00:00
Richard Hughes
0d412b535e trivial: Remove invalid buffer dump in pixart_rf
Spotted by Coverity.
2021-01-08 20:53:11 +00:00
Richard Hughes
e93810202d trivial: Do not install uefi-pk for non-UEFI machines 2021-01-08 18:27:28 +00:00
Richard Hughes
3f7ee4d5a1 libfwupd: Return the progress information using the correct GMainContext
We don't want the (shared) progress notifications going to the thread-default
GMainContext by default as this changes behaviour (ABI?) with older libfwupd
versions.

If the client really does want progress notifications to go to a different
GMainContext they it can call fwupd_client_set_main_context() with the desired
context, e.g. g_main_context_get_thread_default() or g_main_context_new().

This has the intended side effect of returning progress and state notifications
to the main thread, which is typically (but not always) the thread that created
the FwupdClient object.
2021-01-08 16:48:34 +00:00
Richard Hughes
cb408c3dee libfwupd: Never iterate a foreign GMainContext
From Philip's guide: "Never iterate a context created outside the library,
including the global-default or thread-default contexts. Otherwise, GSources
created in the application may be dispatched when the application is not
expecting it, causing re-entrancy problems for the application code."
2021-01-08 16:48:34 +00:00
Richard Hughes
5511dbccf0 libfwupd: Fix a tiny memory leak when using fwupd_client_connect() 2021-01-08 16:48:34 +00:00
Richard Hughes
fb36f226ed libfwupd: Set the daemon status correctly after connect() 2021-01-08 16:48:34 +00:00
Richard Hughes
8cd675f095 trivial: Fix typo in fuzzing instructions 2021-01-08 15:47:32 +00:00
Richard Hughes
fdb3a83a20 uefi-dbx: Ignore the legacy OVMF dummy GUID for the version
This was changed recently in https://sourceforge.net/p/edk2/code/29270/
2021-01-08 14:54:31 +00:00
Richard Hughes
92bfc1b6a8 trivial: Do not hard-depend on newer GLib versions 2021-01-08 09:10:32 +00:00
Richard Hughes
a3c6e8a8bd trivial: Fix -Dcurl=false with latest code 2021-01-08 09:10:29 +00:00
Richard Hughes
21f4cb5d95 trivial: Add one more missing <string.h> 2021-01-07 18:15:31 +00:00
Richard Hughes
67473f1bda trivial: Fix -Dcurl=false for fuzzing 2021-01-07 18:15:27 +00:00
Richard Hughes
2c1f08d874 libfwupd: Do not allow multiple threads to create the GDBusProxy
When using the sync API entrypoints like fwupd_client_get_devices() these call
into fwupd_client_connect() to ensure the proxy is set up. This is not thread
safe and chaos ensues if you call two sync functions from different threads,
like GNOME Software does at startup...

Use a mutex to protect access to this shared resource.

Original test code from Philip Withnall, slightly tweaked by me. Thanks!
2021-01-07 16:39:08 +00:00
Richard Hughes
a18399e523 trivial: Ensure critical warnings are fatal in CI 2021-01-07 16:39:08 +00:00
Richard Hughes
5c9b1fcc81 Only include the start year in the copyright header
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00
Richard Hughes
b63cfa90d6 Detect the AMD TSME encryption state for HSI 2021-01-06 16:45:33 +00:00
Richard Hughes
cf100293b5 Do not export useless device attributes to the client
That giant uint64_t isn't looking so big now, and we'll want to add even more
to it in the future. Split out some private flags that are never useful to the
client, although the #defines will have to remain until we break API again.
2021-01-06 14:36:23 +00:00
Richard Hughes
e002f21066 trivial: Prevent a crash when parsing corrupt RMI firmware
Using fu_common_bytes_new_offset() is much safer as it checks the source size.
2021-01-06 10:08:45 +00:00
Richard Hughes
647ec9677e trivial: Do not show unprintable text when parsing invalid SREC firmware 2021-01-06 10:08:45 +00:00
Richard Hughes
b28e325339 trivial: Fix a buffer over-read when parsing corrupt SMBIOS data 2021-01-06 10:08:45 +00:00
Mario Limonciello
16fd5721c4 thunderbolt: add a unit test to make sure activation shows up 2021-01-06 09:11:00 +00:00
Mario Limonciello
5dc181181e thunderbolt: correct a logic error for DelayedActivation
This logic error wasn't being caught because the `DelayedActivation`
sysfs code wasn't running.

Basically the WD19TB device will have `skips-restart` applied by the quirk
by default.  After `fu_thunderbolt_device_setup_controller` has run
it will have `skips-restart` removed but `usable-during-update` applied
if on a new enough kernel.

In this circumstance the `DelayedActivation` would re-apply `skips-restart`
which is the wrong intended behavior per 834b28009d
2021-01-06 09:11:00 +00:00
Mario Limonciello
9a6692eb84 Notify plugins of their own registrations
The Thunderbolt plugin wasn't actually working properly for
`DelayedActivation` because Thunderbolt devices weren't actually registered.

This only affected ChromeOS.
2021-01-06 09:11:00 +00:00
Mario Limonciello
3165e94f7d trivial: fu-engine: correct a logic error in the daemon for thunderbolt
WD19TB uses skip-restart in some cases, but not all.
The matrix of cases is enumerated in 834b28009d

Unfortunately in the most common case now - new kernel and new daemon
`skip-restart` *isn't* used.  The device should be left in a `needs-activation`
state though.

Use this to skip the trigger of failed upload report.

Fixes: #2731
2021-01-06 09:11:00 +00:00
Richard Hughes
f1c79a8eae trivial: Fix a warning generated by new versions of meson
This fixes:

    DEPRECATION: Library fwupd was passed to the "libraries" keyword argument of
    a previous call to generate() method instead of first positional argument.
    Adding fwupd to "Requires" field, but this is a deprecated behaviour that
    will change in a future version of Meson.
2021-01-05 17:47:23 +00:00
Richard Hughes
2d5b1e13b1 trivial: Fix the meson option for UEFI capsule support 2021-01-05 17:09:02 +00:00
Richard Hughes
104459bd10 Check the AMI test key if not installed for HSI-1
Fixes https://github.com/fwupd/fwupd/issues/2695
2021-01-05 17:09:02 +00:00
Richard Hughes
5c9e9f17c5 libfwupdplugin: Export FuEfiSignatureList for plugins to use 2021-01-05 16:42:58 +00:00
Richard Hughes
f47790bba3 ata: Add OUI quirk for Transcend
Fixes https://github.com/fwupd/fwupd/issues/2721
2021-01-05 16:20:09 +00:00
Richard Hughes
cba9020eae trivial: Fix a buffer over-read when parsing invalid SMBIOS data 2021-01-05 15:59:30 +00:00
Richard Hughes
338cab9e73 libfwupdplugin: Subclass FuFirmware in FuSmbios
This allows us to get fuzzing support for free.
2021-01-05 15:59:30 +00:00
Richard Hughes
610bb24c10 trivial: Show a warning if starting fwupd-firmware-dump without args 2021-01-05 15:59:30 +00:00
Richard Hughes
8c6bfffe2a trivial: Don't crash in the fuzzer for NULL input
The daemon already checks this, but the fuzzer just blindly flings the buffer
to each parser.
2021-01-05 15:59:30 +00:00
Richard Hughes
4bd5450c03 Fix a critical warning when parsing invalid Intel HEX firmware 2021-01-05 15:59:30 +00:00
Richard Hughes
b2e97fb6b5 synaptics-cxaudio: Fix a critical warning when parsing invalid firmware 2021-01-05 15:59:30 +00:00