NetworkManager/libnm-core
Thomas Haller 2fb5aaecef libnm/vpn: search VPN plugin in NMPLUGINDIR
In commit ca000cffbb, 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: ca000cffbb
(cherry picked from commit 0b128aeced)
2016-04-19 15:16:07 +02:00
..
tests build: disable deprecation checks for internal compilation 2016-04-05 22:22:58 +02:00
crypto.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
crypto.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
crypto_gnutls.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
crypto_nss.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
Makefile.am libnm/vpn: search VPN plugin in NMPLUGINDIR 2016-04-19 15:16:07 +02:00
Makefile.libnm-core shared: include "nm-shared-utils.h" 2016-03-26 12:10:53 +01:00
nm-connection-private.h libnm-core: make nm_setting_verify() take an NMConnection 2014-10-28 17:17:17 -04:00
nm-connection.c libnm-core: add _nm_simple_connection_new_from_dbus() function 2016-03-26 12:10:54 +01:00
nm-connection.h libnm-core: add NMSettingVxlan 2015-12-09 16:36:46 +01:00
nm-core-internal.h libnm/vpn: search VPN plugin in NMPLUGINDIR 2016-04-19 15:16:07 +02:00
nm-core-types-internal.h libnm: internally expose NMVlanQosMapping struct in "nm-core-internal.h" 2015-11-02 13:57:02 +01:00
nm-core-types.h libnm-core: add NMSettingVxlan 2015-12-09 16:36:46 +01:00
nm-dbus-interface.h dbus: move NMWimaxNspNetworkType to nm-dbus-interface.h 2016-04-05 14:37:51 +02:00
nm-dbus-utils.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-errors.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-errors.h all: add version-id argument to device's Reapply method 2016-02-16 11:24:49 +01:00
nm-keyfile-internal.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-keyfile-reader.c libnm-core: remove special handling of missing VLAN_FLAGS 2016-02-29 18:11:17 +01:00
nm-keyfile-utils.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-keyfile-utils.h libnm/keyfile/trivial: rename VPN_SECRETS_GROUP define to NM_KEYFILE_GROUP_VPN_SECRETS 2016-02-14 11:14:35 +01:00
nm-keyfile-writer.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-property-compare.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-property-compare.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-setting-8021x.c libnm-core: nm-setting-8021x: treat some empty properties as NULL 2016-03-16 17:32:17 +01:00
nm-setting-8021x.h libnm-core: add domain-suffix-match properties to NMSetting8021x 2016-03-16 17:32:17 +01:00
nm-setting-adsl.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-adsl.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-bluetooth.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-bluetooth.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-bond.c libnm-core: implement option matching for NMSettingBond 2016-03-29 18:10:05 +02:00
nm-setting-bond.h bond: add some missing options 2016-03-29 18:10:05 +02:00
nm-setting-bridge-port.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-bridge-port.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-bridge.c man,libnm-core: fix typos 2016-03-30 12:03:36 +02:00
nm-setting-bridge.h libnm-core: add multicast-snooping property to bridge setting 2015-02-26 09:08:13 +01:00
nm-setting-cdma.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-cdma.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-connection.c libnm-core: allow strict and relaxed error behavior for _nm_setting_new_from_dbus() 2016-03-26 12:10:54 +01:00
nm-setting-connection.h libnm: add 'lldp' property to NMSettingConnection 2015-10-12 14:44:19 +02:00
nm-setting-dcb.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-dcb.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-generic.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-generic.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-gsm.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-gsm.h libnm/wwan: add GSM setting device-id, sim-id, and sim-operator-id properties 2015-11-18 15:50:52 +01:00
nm-setting-infiniband.c man,libnm-core: fix typos 2016-03-30 12:03:36 +02:00
nm-setting-infiniband.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-ip-config.c libnm-core: drup unused @allow_zero_prefix argument from valid_prefix() 2016-04-12 11:16:12 +02:00
nm-setting-ip-config.h libnm-core: add 'use-vc' DNS option 2016-04-03 23:08:38 +02:00
nm-setting-ip-tunnel.c libnm-core: fix memory leak in nm-setting-ip-tunnel.c 2016-03-09 23:16:23 +01:00
nm-setting-ip-tunnel.h ip-tunnel: add a MTU property 2015-12-19 12:06:33 +01:00
nm-setting-ip4-config.c libnm-core: allow strict and relaxed error behavior for _nm_setting_new_from_dbus() 2016-03-26 12:10:54 +01:00
nm-setting-ip4-config.h libnm,core,cli: move dhcp-timeout property to generic NMSettingIPConfig 2016-02-16 11:37:26 +01:00
nm-setting-ip6-config.c libnm-core: allow strict and relaxed error behavior for _nm_setting_new_from_dbus() 2016-03-26 12:10:54 +01:00
nm-setting-ip6-config.h libnm: fix documentation of NMSettingIP6ConfigAddrGenMode values 2015-12-18 10:27:27 +01:00
nm-setting-macvlan.c libnm-core: remove trailing quote from message in nm-setting-macvlan.c 2016-03-30 00:33:20 +02:00
nm-setting-macvlan.h libnm-core: add NMSettingMacvlan 2015-12-09 14:30:08 +01:00
nm-setting-olpc-mesh.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-olpc-mesh.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-ppp.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-ppp.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-pppoe.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-pppoe.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-private.h libnm-core: allow strict and relaxed error behavior for _nm_setting_new_from_dbus() 2016-03-26 12:10:54 +01:00
nm-setting-serial.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-serial.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-team-port.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-team-port.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-team.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-team.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-tun.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-tun.h libnm-core: add NMSettingTun 2015-11-25 11:39:57 +01:00
nm-setting-vlan.c libnm-core: allow strict and relaxed error behavior for _nm_setting_new_from_dbus() 2016-03-26 12:10:54 +01:00
nm-setting-vlan.h platform: NM defines for vlan header flags equal the linux headers 2015-10-27 17:24:52 +01:00
nm-setting-vpn.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-vpn.h libnm-core: add vpn.timeout property for establishing connections 2015-09-21 16:59:04 +02:00
nm-setting-vxlan.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-vxlan.h libnm-core: add NMSettingVxlan 2015-12-09 16:36:46 +01:00
nm-setting-wimax.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-wimax.h wimax: drop WiMAX support (bgo #747846) 2015-04-17 12:42:23 -04:00
nm-setting-wired.c man,libnm-core: fix typos 2016-03-30 12:03:36 +02:00
nm-setting-wired.h wake-on-lan: add option to keep existing settings 2015-10-16 17:11:26 +02:00
nm-setting-wireless-security.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-setting-wireless-security.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-setting-wireless.c man,libnm-core: fix typos 2016-03-30 12:03:36 +02:00
nm-setting-wireless.h wifi: don't touch by default current powersave setting 2016-02-16 00:18:06 +01:00
nm-setting.c libnm-core: allow strict and relaxed error behavior for _nm_setting_new_from_dbus() 2016-03-26 12:10:54 +01:00
nm-setting.h libnm: add nm_setting_verify_secrets() and nm_connection_verify_secrets() 2015-11-20 10:35:10 +01:00
nm-simple-connection.c libnm-core: add _nm_simple_connection_new_from_dbus() function 2016-03-26 12:10:54 +01:00
nm-simple-connection.h libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-utils-private.h libnm: expose strv utils function in internal header nm-core-internal.h 2015-07-02 15:50:04 +02:00
nm-utils.c build: drop internal field __nm_git_sha from libraries 2016-03-30 15:48:56 +02:00
nm-utils.h libnm-core: add nm_utils_enum_get_values() 2015-12-01 17:39:40 +01:00
nm-version.h release: add version 1.4 macros 2016-04-05 22:22:58 +02:00
nm-vpn-dbus-interface.h dbus: remove the telepathy annotations 2016-04-05 14:37:51 +02:00
nm-vpn-editor-plugin.c libnm/vpn: search VPN plugin in NMPLUGINDIR 2016-04-19 15:16:07 +02:00
nm-vpn-editor-plugin.h libnm/vpn: search VPN plugin in NMPLUGINDIR 2016-04-19 15:16:07 +02:00
nm-vpn-plugin-info.c libnm/vpn: search VPN plugin in NMPLUGINDIR 2016-04-19 15:16:07 +02:00
nm-vpn-plugin-info.h vpn-plugin-info: drop nm_vpn_plugin_info_get_service() 2015-11-02 16:01:21 +01:00