This wires up the DeviceClass types to have their
security checked when devices are created.

Signed-off-by: Daniel P. Berrangé <[email protected]>
---
 system/qdev-monitor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c
index 5c87fda509..a69dbf802f 100644
--- a/system/qdev-monitor.c
+++ b/system/qdev-monitor.c
@@ -672,6 +672,10 @@ DeviceState *qdev_device_add_from_qdict(const QDict *opts,
         return NULL;
     }
 
+    if (!object_class_check_security(OBJECT_CLASS(dc), errp)) {
+        return NULL;
+    }
+
     /* find bus */
     path = qdict_get_try_str(opts, "bus");
     if (path != NULL) {
-- 
2.55.0


Reply via email to