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:
Dan Williams
2009-02-18 14:01:33 -05:00
parent 68ca77cdb5
commit 53d76d8bac
4 changed files with 16 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 *