mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 07:00:05 +01:00
vpn: add nm_vpn_plugin_info_supports_safe_private_file_access()
The new API indicates that the VPN plugin supports reading files (certificates, keys) of private connections in a safe way (i.e. checking user permissions), or that it doesn't need to read any file from disk. (cherry picked from commit10db4baeb6) (cherry picked from commit8437e14758) (cherry picked from commit15346f1a4f)
This commit is contained in:
parent
425fd0d031
commit
29d190ef95
4 changed files with 31 additions and 0 deletions
|
|
@ -2048,3 +2048,8 @@ global:
|
|||
nm_setting_ethtool_fec_mode_get_type;
|
||||
nm_ethtool_optname_is_fec;
|
||||
} libnm_1_50_0;
|
||||
|
||||
libnm_1_52_2 {
|
||||
global:
|
||||
nm_vpn_plugin_info_supports_safe_private_file_access;
|
||||
} libnm_1_52_0;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ def syms_from_ver(verfile):
|
|||
# hardcode it.
|
||||
c_syms["nm_ethtool_optname_is_feature"] = "1.20"
|
||||
c_syms["nm_setting_bond_port_get_prio"] = "1.44"
|
||||
c_syms["nm_vpn_plugin_info_supports_safe_private_file_access"] = "1.56"
|
||||
|
||||
return c_syms
|
||||
|
||||
|
|
|
|||
|
|
@ -913,6 +913,29 @@ nm_vpn_plugin_info_supports_multiple(NMVpnPluginInfo *self)
|
|||
return _nm_utils_ascii_str_to_bool(s, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_vpn_plugin_info_supports_safe_private_file_access:
|
||||
* @self: plugin info instance
|
||||
*
|
||||
* Returns: %TRUE if the service supports reading files (certificates, keys) of
|
||||
* private connections in a safe way (i.e. checking user permissions), or
|
||||
if the service doesn't need to read any file from disk.
|
||||
*
|
||||
* Since: 1.56, 1.52.2
|
||||
*/
|
||||
gboolean
|
||||
nm_vpn_plugin_info_supports_safe_private_file_access(NMVpnPluginInfo *self)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
g_return_val_if_fail(NM_IS_VPN_PLUGIN_INFO(self), FALSE);
|
||||
|
||||
s = nm_vpn_plugin_info_lookup_property(self,
|
||||
NM_VPN_PLUGIN_INFO_KF_GROUP_CONNECTION,
|
||||
"supports-safe-private-file-access");
|
||||
return _nm_utils_ascii_str_to_bool(s, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_vpn_plugin_info_get_aliases:
|
||||
* @self: plugin info instance
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ NM_AVAILABLE_IN_1_4
|
|||
gboolean nm_vpn_plugin_info_supports_hints(NMVpnPluginInfo *self);
|
||||
NM_AVAILABLE_IN_1_42
|
||||
gboolean nm_vpn_plugin_info_supports_multiple(NMVpnPluginInfo *self);
|
||||
NM_AVAILABLE_IN_1_52_2
|
||||
gboolean nm_vpn_plugin_info_supports_safe_private_file_access(NMVpnPluginInfo *self);
|
||||
NM_AVAILABLE_IN_1_4
|
||||
const char *const *nm_vpn_plugin_info_get_aliases(NMVpnPluginInfo *self);
|
||||
NM_AVAILABLE_IN_1_2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue