diff options
author | Thomas Haller <thaller@redhat.com> | 2016-04-19 14:39:33 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-04-19 14:59:26 +0200 |
commit | 0b128aeced540d98dd4fdea2598dbf1a6c47c6ad (patch) | |
tree | 19d2275b561e4ded228601ad01f5614f66fa4848 /libnm-core/nm-core-internal.h | |
parent | 7652e9ebe0c0a52139af763f007a61fd8f694f83 (diff) | |
download | NetworkManager-0b128aeced540d98dd4fdea2598dbf1a6c47c6ad.tar.gz |
libnm/vpn: search VPN plugin in NMPLUGINDIR
In commit ca000cffbb9ef20c6dd965283df3f1babf0a7745, we changed to
accept a plugin library name without path. One reason for that
is to keep architecture dependent parts out of the .name file
and possibly support multilib.
However, the shared libraries of VPN plugins are not installed in
a global library search path, but for example into
"/usr/lib64/NetworkManager/libnm-vpn-plugin-openvpn.so".
In that case, specifying "plugin=libnm-vpn-plugin-openvpn.so"
would not be enough to find plugin.
Instead, when configuring a plugin name without path, assume
it is in NMPLUGINDIR directory. Modify nm_vpn_editor_plugin_load_from_file()
to allow path-less plugin-names. Previously such names would be rejected
as not being absolute. This API allows to do file verification
before loading the plugin, but it now supports prepending NMPLUGINDIR
to the plugin name. Basically, this function mangles the plugin_name
argument and checks that such a file exists.
The recently added nm_vpn_editor_plugin_load() continues to behave
as before: it does no checks whatsoever and passes the name directly
to dlopen(). That way, it uses system search paths like LD_LIBRARY_PATH
and performs no checks on the file.
Fixes: ca000cffbb9ef20c6dd965283df3f1babf0a7745
Diffstat (limited to 'libnm-core/nm-core-internal.h')
-rw-r--r-- | libnm-core/nm-core-internal.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 8d97b066ee..2041a1d3a1 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -246,14 +246,6 @@ GSList *_nm_vpn_plugin_info_list_load_dir (const char *dirname, NMUtilsCheckFilePredicate check_file, gpointer user_data); -NMVpnEditorPlugin * _nm_vpn_editor_plugin_load (const char *plugin_filename, - gboolean force_absolute_path, - const char *check_service, - int check_owner, - NMUtilsCheckFilePredicate check_file, - gpointer user_data, - GError **error); - /***********************************************************/ typedef struct { |