[network-manager-netbook/MplPanelClient] fix retrieval of 802.1x private key passwords
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-netbook/MplPanelClient] fix retrieval of 802.1x private key passwords
- Date: Wed, 30 Sep 2009 00:12:27 +0000 (UTC)
commit ffcb7a817626dd3fa6a3156e44f566942b175533
Author: Dan Williams <dcbw redhat com>
Date: Tue Sep 29 17:10:24 2009 -0700
fix retrieval of 802.1x private key passwords
Use NMSettingsConnectionInterface to get secrets instead of two
different codepaths for system and user secrets. But since
returning secrets to NM via D-Bus requires decrypting the private
key (and thus the password isn't required), we still need a way
to get the actual private key password out of the generic GetSecrets
handler for NMAGConfConnection. Hijack the "include_private_passwords"
argument of nm_gconf_get_keyring_items() to do this for us.
(port of nm-applet commit 6c32fdcdbb73196e77428ec9ce50925506d78d03)
src/wireless-security/helpers.c | 25 ++++---------------------
1 files changed, 4 insertions(+), 21 deletions(-)
---
diff --git a/src/wireless-security/helpers.c b/src/wireless-security/helpers.c
index 9b08713..47deb6a 100644
--- a/src/wireless-security/helpers.c
+++ b/src/wireless-security/helpers.c
@@ -31,9 +31,6 @@ helper_fill_secret_entry (NMConnection *connection,
const char *secret_name)
{
NMSetting *setting;
- GHashTable *secrets;
- GError *error = NULL;
- GValue *value;
const char *tmp;
g_return_if_fail (connection != NULL);
@@ -43,24 +40,10 @@ helper_fill_secret_entry (NMConnection *connection,
g_return_if_fail (secret_name != NULL);
setting = nm_connection_get_setting (connection, setting_type);
-
- if (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) {
- if (setting) {
- tmp = (*func) (setting);
- if (tmp)
- gtk_entry_set_text (entry, tmp);
- }
- } else {
- secrets = nm_gconf_get_keyring_items (connection, setting_name, FALSE, &error);
- if (!secrets) {
- g_clear_error (&error);
- return;
- }
-
- value = g_hash_table_lookup (secrets, secret_name);
- if (value)
- gtk_entry_set_text (entry, g_value_get_string (value));
- g_hash_table_destroy (secrets);
+ if (setting) {
+ tmp = (*func) (setting);
+ if (tmp)
+ gtk_entry_set_text (entry, tmp);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]