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:
@@ -319,7 +319,10 @@ nm_ifcfg_connection_get_unmanaged (NMIfcfgConnection *self)
|
|||||||
static GHashTable *
|
static GHashTable *
|
||||||
get_settings (NMExportedConnection *exported)
|
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
|
static gboolean
|
||||||
|
@@ -126,7 +126,10 @@ nm_suse_connection_new (const char *iface, NMDeviceType dev_type)
|
|||||||
static GHashTable *
|
static GHashTable *
|
||||||
get_settings (NMExportedConnection *exported)
|
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
|
static gboolean
|
||||||
|
@@ -70,7 +70,10 @@ nm_ifupdown_connection_new (if_block *block)
|
|||||||
static GHashTable *
|
static GHashTable *
|
||||||
get_settings (NMExportedConnection *exported)
|
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
|
static gboolean
|
||||||
|
@@ -67,7 +67,10 @@ nm_keyfile_connection_get_filename (NMKeyfileConnection *self)
|
|||||||
static GHashTable *
|
static GHashTable *
|
||||||
get_settings (NMExportedConnection *exported)
|
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 *
|
static GValue *
|
||||||
|
Reference in New Issue
Block a user