diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-08-21 13:36:11 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-08-21 16:06:39 +0200 |
commit | 00b73a9f101b19c8b71485f28d43a64c1be64de8 (patch) | |
tree | 275b2027270e54742ad96b6e11fa9b6119c7221c | |
parent | 4b9f56ecfbc316f6a79c4eb1b91cfc9d18d8130d (diff) | |
download | NetworkManager-00b73a9f101b19c8b71485f28d43a64c1be64de8.tar.gz |
libnm,vpn-editor-plugin: don't assert the plugin name is the same as service name
It's not. It's meant to be human readable (e.g. "IPSec network that sometimes
works").
-rw-r--r-- | libnm-core/nm-vpn-editor-plugin.c | 7 | ||||
-rw-r--r-- | libnm-core/nm-vpn-editor-plugin.h | 1 | ||||
-rw-r--r-- | libnm-core/nm-vpn-plugin-info.c | 1 |
3 files changed, 2 insertions, 7 deletions
diff --git a/libnm-core/nm-vpn-editor-plugin.c b/libnm-core/nm-vpn-editor-plugin.c index 5657d17320..4fc3bbfdc6 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 83d765d097..16e9533d23 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 fde258df8c..6dd24a099d 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, |