mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 02:50:17 +01:00
system-settings: don't return secrets in the settings
Since only authorized users should be able to get secrets, don't return them in the GetSettings handlers; callers need to use GetSecrets instead.
This commit is contained in:
parent
4e873d09b0
commit
13e49239bd
4 changed files with 16 additions and 4 deletions
|
|
@ -319,7 +319,10 @@ nm_ifcfg_connection_get_unmanaged (NMIfcfgConnection *self)
|
|||
static GHashTable *
|
||||
get_settings (NMExportedConnection *exported)
|
||||
{
|
||||
return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
|
||||
NMConnection *connection = nm_exported_connection_get_connection (exported);
|
||||
|
||||
nm_connection_clear_secrets (connection);
|
||||
return nm_connection_to_hash (connection);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
|
|
@ -126,7 +126,10 @@ nm_suse_connection_new (const char *iface, NMDeviceType dev_type)
|
|||
static GHashTable *
|
||||
get_settings (NMExportedConnection *exported)
|
||||
{
|
||||
return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
|
||||
NMConnection *connection = nm_exported_connection_get_connection (exported);
|
||||
|
||||
nm_connection_clear_secrets (connection);
|
||||
return nm_connection_to_hash (connection);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ nm_ifupdown_connection_new (if_block *block)
|
|||
static GHashTable *
|
||||
get_settings (NMExportedConnection *exported)
|
||||
{
|
||||
return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
|
||||
NMConnection *connection = nm_exported_connection_get_connection (exported);
|
||||
|
||||
nm_connection_clear_secrets (connection);
|
||||
return nm_connection_to_hash (connection);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@ nm_keyfile_connection_get_filename (NMKeyfileConnection *self)
|
|||
static GHashTable *
|
||||
get_settings (NMExportedConnection *exported)
|
||||
{
|
||||
return nm_connection_to_hash (nm_exported_connection_get_connection (exported));
|
||||
NMConnection *connection = nm_exported_connection_get_connection (exported);
|
||||
|
||||
nm_connection_clear_secrets (connection);
|
||||
return nm_connection_to_hash (connection);
|
||||
}
|
||||
|
||||
static GValue *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue