trivial: fu-engine: raise a runtime issue if plugin whitelist set

If a plugin whitelist is set, the HSI value will be wrong.

```
$ sudo ./build/src/fwupdtool security --force --plugin-whitelist=tpm
Loading…                 [***************************************]
Host Security ID: HSI:1

HSI-1
✔  TPM: v2.0

Runtime Suffix -U
✘  Firmware Updates: No system device

Runtime Suffix -A
✘  Firmware Attestation: No PCR0s

Runtime Suffix -!
✔  fwupd plugins: OK
```
This commit is contained in:
Mario Limonciello 2020-05-13 09:39:35 -05:00 committed by Mario Limonciello
parent b8a57e598a
commit c88d4eadf1

View File

@ -5045,6 +5045,8 @@ fu_engine_add_security_attrs_tainted (FuEngine *self, FuSecurityAttrs *attrs)
fwupd_security_attr_add_flag (attr, FWUPD_SECURITY_ATTR_FLAG_RUNTIME_ISSUE);
if (self->tainted) {
fwupd_security_attr_set_result (attr, "Tainted");
} else if (self->plugin_filter->len > 0) {
fwupd_security_attr_set_result (attr, "Disabled plugins");
} else {
fwupd_security_attr_add_flag (attr, FWUPD_SECURITY_ATTR_FLAG_SUCCESS);
}