aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-plugin-manager.c')
-rw-r--r--src/mm-plugin-manager.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c
index 2123bded..557c2d5d 100644
--- a/src/mm-plugin-manager.c
+++ b/src/mm-plugin-manager.c
@@ -1496,6 +1496,21 @@ mm_plugin_manager_peek_plugin (MMPluginManager *self,
/*****************************************************************************/
+static void
+register_plugin_whitelist_tags (MMPluginManager *self,
+ MMPlugin *plugin)
+{
+ const gchar **tags;
+ guint i;
+
+ if (!mm_filter_check_rule_enabled (self->priv->filter, MM_FILTER_RULE_PLUGIN_WHITELIST))
+ return;
+
+ tags = mm_plugin_get_allowed_udev_tags (plugin);
+ for (i = 0; tags && tags[i]; i++)
+ mm_filter_register_plugin_whitelist_tag (self->priv->filter, tags[i]);
+}
+
static MMPlugin *
load_plugin (const gchar *path)
{
@@ -1609,6 +1624,9 @@ load_plugins (MMPluginManager *self,
else
/* Vendor specific plugin */
self->priv->plugins = g_list_append (self->priv->plugins, plugin);
+
+ /* Register plugin whitelist tags in filter, if any */
+ register_plugin_whitelist_tags (self, plugin);
}
/* Check the generic plugin once all looped */