mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 23:19:50 +00:00
Do not allow devices that have no vendor ID to be UPDATABLE
This commit is contained in:
parent
dbcc8e1137
commit
d8ea8da902
@ -4356,6 +4356,13 @@ fu_engine_add_device (FuEngine *self, FuDevice *device)
|
||||
fu_device_set_update_error (device, "VersionFormat is ambiguous for this device");
|
||||
}
|
||||
|
||||
/* no vendor-id, and so no way to lock it down! */
|
||||
if (fu_device_has_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE) &&
|
||||
fu_device_get_vendor_id (device) == NULL) {
|
||||
fu_device_remove_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE);
|
||||
fu_device_set_update_error (device, "No vendor ID set");
|
||||
}
|
||||
|
||||
/* notify all plugins about this new device */
|
||||
if (!fu_device_has_flag (device, FWUPD_DEVICE_FLAG_REGISTERED))
|
||||
fu_engine_plugin_device_register (self, device);
|
||||
|
Loading…
Reference in New Issue
Block a user