mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 05:10:22 +01:00
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").
This commit is contained in:
parent
4b9f56ecfb
commit
00b73a9f10
3 changed files with 2 additions and 7 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue