diff --git a/libnm-core/nm-vpn-editor-plugin.c b/libnm-core/nm-vpn-editor-plugin.c index 5657d1732..4fc3bbfdc 100644 --- a/libnm-core/nm-vpn-editor-plugin.c +++ b/libnm-core/nm-vpn-editor-plugin.c @@ -83,8 +83,6 @@ nm_vpn_editor_plugin_default_init (NMVpnEditorPluginInterface *iface) * If the path is not an absolute path or no matching module * can be found, lookup inside a directory defined at compile time. * Due to this, @check_file might be called for two different paths. - * @check_name: if not-null, check that the loaded plugin has - * the given name. * @check_service: if not-null, check that the loaded plugin advertises * the given service. * @check_owner: if non-negative, check whether the file is owned @@ -105,7 +103,6 @@ nm_vpn_editor_plugin_default_init (NMVpnEditorPluginInterface *iface) */ NMVpnEditorPlugin * nm_vpn_editor_plugin_load_from_file (const char *plugin_filename, - const char *check_name, const char *check_service, int check_owner, NMUtilsCheckFilePredicate check_file, @@ -160,11 +157,11 @@ nm_vpn_editor_plugin_load_from_file (const char *plugin_filename, NM_VPN_EDITOR_PLUGIN_SERVICE, &plug_service, NULL); - if (check_name && g_strcmp0 (plug_name, check_name) != 0) { + if (!plug_name || !*plug_name) { g_set_error (error, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_FAILED, - _("cannot load VPN plugin in '%s': invalid plugin name"), + _("cannot load VPN plugin in '%s': missing plugin name"), g_module_name (module)); } else if ( check_service && g_strcmp0 (plug_service, check_service) != 0) { diff --git a/libnm-core/nm-vpn-editor-plugin.h b/libnm-core/nm-vpn-editor-plugin.h index 83d765d09..16e9533d2 100644 --- a/libnm-core/nm-vpn-editor-plugin.h +++ b/libnm-core/nm-vpn-editor-plugin.h @@ -141,7 +141,6 @@ char *nm_vpn_editor_plugin_get_suggested_filename (NMVpnEditorPlugin *pl NM_AVAILABLE_IN_1_2 NMVpnEditorPlugin *nm_vpn_editor_plugin_load_from_file (const char *plugin_filename, - const char *check_name, const char *check_service, int check_owner, NMUtilsCheckFilePredicate check_file, diff --git a/libnm-core/nm-vpn-plugin-info.c b/libnm-core/nm-vpn-plugin-info.c index fde258df8..6dd24a099 100644 --- a/libnm-core/nm-vpn-plugin-info.c +++ b/libnm-core/nm-vpn-plugin-info.c @@ -743,7 +743,6 @@ nm_vpn_plugin_info_load_editor_plugin (NMVpnPluginInfo *self, GError **error) priv->editor_plugin_loaded = TRUE; priv->editor_plugin = nm_vpn_editor_plugin_load_from_file (plugin_filename, - priv->name, nm_vpn_plugin_info_get_service (self), getuid (), NULL,