Commit 2d1e7104 authored by Carlos Garnacho's avatar Carlos Garnacho

tracker-extract: Ensure extract modules are initialized on startup

This takes module initialization out of the sandbox. Modules are
trusted bits of code, so only the extract function must be taken
as untrusted.
parent ccf5b4b5
......@@ -581,3 +581,17 @@ tracker_mimetype_info_free (TrackerMimetypeInfo *info)
g_slice_free (TrackerMimetypeInfo, info);
}
void
tracker_module_manager_load_modules (void)
{
RuleInfo *rule_info;
guint i;
g_return_if_fail (initialized == TRUE);
for (i = 0; i < rules->len; i++) {
rule_info = &g_array_index (rules, RuleInfo, i);
load_module (rule_info, TRUE);
}
}
......@@ -57,6 +57,8 @@ GModule * tracker_mimetype_info_get_module (TrackerMimetypeInfo *info,
gboolean tracker_mimetype_info_iter_next (TrackerMimetypeInfo *info);
void tracker_mimetype_info_free (TrackerMimetypeInfo *info);
void tracker_module_manager_load_modules (void);
G_END_DECLS
#endif /* __TRACKER_EXTRACT_MODULE_MANAGER_H__ */
......@@ -382,6 +382,8 @@ main (int argc, char *argv[])
return EXIT_FAILURE;
}
tracker_module_manager_load_modules ();
decorator = tracker_extract_decorator_new (extract, NULL, &error);
if (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment