Allow OnlyTrusted=false in the non-polkit case

This commit is contained in:
Richard Hughes 2021-10-17 13:07:07 +01:00
parent 9c7939dae3
commit fcb5257e16
2 changed files with 1 additions and 12 deletions

View File

@ -46,6 +46,5 @@ UriSchemes=
# Ignore power levels of devices when running updates # Ignore power levels of devices when running updates
IgnorePower=false IgnorePower=false
# For systems using polkit for authorization, only support installing firmware # Only support installing firmware signed with a trusted key
# signed with a trusted key
OnlyTrusted=true OnlyTrusted=true

View File

@ -1709,7 +1709,6 @@ fu_engine_check_requirement(FuEngine *self,
gboolean gboolean
fu_engine_check_trust(FuEngine *self, FuInstallTask *task, GError **error) fu_engine_check_trust(FuEngine *self, FuInstallTask *task, GError **error)
{ {
#ifdef HAVE_POLKIT
if (fu_config_get_only_trusted(self->config) && if (fu_config_get_only_trusted(self->config) &&
(fu_install_task_get_trust_flags(task) & FWUPD_TRUST_FLAG_PAYLOAD) == 0) { (fu_install_task_get_trust_flags(task) & FWUPD_TRUST_FLAG_PAYLOAD) == 0) {
g_autofree gchar *sysconfdir = fu_common_get_path(FU_PATH_KIND_SYSCONFDIR_PKG); g_autofree gchar *sysconfdir = fu_common_get_path(FU_PATH_KIND_SYSCONFDIR_PKG);
@ -1722,15 +1721,6 @@ fu_engine_check_trust(FuEngine *self, FuInstallTask *task, GError **error)
fn); fn);
return FALSE; return FALSE;
} }
#else
if ((fu_install_task_get_trust_flags(task) & FWUPD_TRUST_FLAG_PAYLOAD) == 0) {
g_set_error_literal(error,
FWUPD_ERROR,
FWUPD_ERROR_INVALID_FILE,
"firmware signature missing or not trusted");
return FALSE;
}
#endif
return TRUE; return TRUE;
} }