network-manager-applet r669 - in trunk: . src src/gconf-helpers src/wireless-security
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r669 - in trunk: . src src/gconf-helpers src/wireless-security
- Date: Tue, 15 Apr 2008 18:41:42 +0100 (BST)
Author: dcbw
Date: Tue Apr 15 18:41:42 2008
New Revision: 669
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=669&view=rev
Log:
2008-04-15 Dan Williams <dcbw redhat com>
* src/gconf-helpers/gconf-helpers.c
src/gconf-helpers/gconf-helpers.h
- (nm_gconf_get_keyring_items): add option to include private passwords
(like the private key password and phase2 private key passwords)
in the returned tables for use in UI bits. Fixes issue where the
802.1x security widgets couldn't get the private key password to
display to the user.
* src/wireless-security/eap-method-leap.c
src/wireless-security/ws-leap.c
src/wireless-security/ws-wep-key.c
src/wireless-security/ws-wpa-psk.c
src/wireless-security/eap-method-simple.c
src/wireless-security/eap-method-tls.c
src/applet-dbus-settings.c
- Fix up for nm_gconf_get_keyring_items() changes
Modified:
trunk/ChangeLog
trunk/src/applet-dbus-settings.c
trunk/src/gconf-helpers/gconf-helpers.c
trunk/src/gconf-helpers/gconf-helpers.h
trunk/src/wireless-security/eap-method-leap.c
trunk/src/wireless-security/eap-method-simple.c
trunk/src/wireless-security/eap-method-tls.c
trunk/src/wireless-security/ws-leap.c
trunk/src/wireless-security/ws-wep-key.c
trunk/src/wireless-security/ws-wpa-psk.c
Modified: trunk/src/applet-dbus-settings.c
==============================================================================
--- trunk/src/applet-dbus-settings.c (original)
+++ trunk/src/applet-dbus-settings.c Tue Apr 15 18:41:42 2008
@@ -1180,7 +1180,7 @@
g_free, (GDestroyNotify) g_hash_table_destroy);
id = nm_exported_connection_get_id (parent);
- secrets = nm_gconf_get_keyring_items (connection, id, setting_name, &error);
+ secrets = nm_gconf_get_keyring_items (connection, id, setting_name, FALSE, &error);
if (!secrets) {
if (error) {
nm_warning ("Error getting secrets: %s", error->message);
Modified: trunk/src/gconf-helpers/gconf-helpers.c
==============================================================================
--- trunk/src/gconf-helpers/gconf-helpers.c (original)
+++ trunk/src/gconf-helpers/gconf-helpers.c Tue Apr 15 18:41:42 2008
@@ -1375,6 +1375,7 @@
nm_gconf_get_keyring_items (NMConnection *connection,
const char *connection_id,
const char *setting_name,
+ gboolean include_private_passwords,
GError **error)
{
NMSettingConnection *s_con;
@@ -1447,6 +1448,14 @@
__FILE__, __LINE__, connection_name, setting_name);
}
break;
+ } else if (include_private_passwords) {
+ /* If asked, include the actual private key passwords and such
+ * too. NOT to be used in response to a GetSecrets call, but
+ * for displaying the passwords in the UI if required.
+ */
+ g_hash_table_insert (secrets,
+ g_strdup (key_name),
+ string_to_gvalue (found->secret));
}
} else {
/* Ignore older obsolete keyring keys that we don't want to leak
Modified: trunk/src/gconf-helpers/gconf-helpers.h
==============================================================================
--- trunk/src/gconf-helpers/gconf-helpers.h (original)
+++ trunk/src/gconf-helpers/gconf-helpers.h Tue Apr 15 18:41:42 2008
@@ -200,6 +200,7 @@
nm_gconf_get_keyring_items (NMConnection *connection,
const char *connection_id,
const char *setting_name,
+ gboolean include_private_passwords,
GError **error);
#endif /* GCONF_HELPERS_H */
Modified: trunk/src/wireless-security/eap-method-leap.c
==============================================================================
--- trunk/src/wireless-security/eap-method-leap.c (original)
+++ trunk/src/wireless-security/eap-method-leap.c Tue Apr 15 18:41:42 2008
@@ -172,7 +172,10 @@
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id, NM_SETTING_802_1X_SETTING_NAME, &error);
+ secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ TRUE,
+ &error);
if (secrets) {
value = g_hash_table_lookup (secrets, NM_SETTING_802_1X_PASSWORD);
if (value)
Modified: trunk/src/wireless-security/eap-method-simple.c
==============================================================================
--- trunk/src/wireless-security/eap-method-simple.c (original)
+++ trunk/src/wireless-security/eap-method-simple.c Tue Apr 15 18:41:42 2008
@@ -190,7 +190,10 @@
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id, NM_SETTING_802_1X_SETTING_NAME, &error);
+ secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ TRUE,
+ &error);
if (secrets) {
value = g_hash_table_lookup (secrets, NM_SETTING_802_1X_PASSWORD);
if (value)
Modified: trunk/src/wireless-security/eap-method-tls.c
==============================================================================
--- trunk/src/wireless-security/eap-method-tls.c (original)
+++ trunk/src/wireless-security/eap-method-tls.c Tue Apr 15 18:41:42 2008
@@ -413,7 +413,10 @@
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id, NM_SETTING_802_1X_SETTING_NAME, &error);
+ secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ TRUE,
+ &error);
if (secrets) {
value = g_hash_table_lookup (secrets, NMA_PRIVATE_KEY_PASSWORD_TAG);
if (value)
Modified: trunk/src/wireless-security/ws-leap.c
==============================================================================
--- trunk/src/wireless-security/ws-leap.c (original)
+++ trunk/src/wireless-security/ws-leap.c Tue Apr 15 18:41:42 2008
@@ -166,7 +166,10 @@
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, &error);
+ secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ FALSE,
+ &error);
if (secrets) {
value = g_hash_table_lookup (secrets, NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD);
if (value)
Modified: trunk/src/wireless-security/ws-wep-key.c
==============================================================================
--- trunk/src/wireless-security/ws-wep-key.c (original)
+++ trunk/src/wireless-security/ws-wep-key.c Tue Apr 15 18:41:42 2008
@@ -315,7 +315,10 @@
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, &error);
+ secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ FALSE,
+ &error);
if (secrets) {
value = g_hash_table_lookup (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY0);
if (value)
@@ -428,7 +431,10 @@
if (!connection)
return WEP_KEY_TYPE_PASSPHRASE;
- secrets = nm_gconf_get_keyring_items (connection, connection_id, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, &error);
+ secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ FALSE,
+ &error);
if (!secrets || (g_hash_table_size (secrets) == 0))
return WEP_KEY_TYPE_PASSPHRASE;
Modified: trunk/src/wireless-security/ws-wpa-psk.c
==============================================================================
--- trunk/src/wireless-security/ws-wpa-psk.c (original)
+++ trunk/src/wireless-security/ws-wpa-psk.c Tue Apr 15 18:41:42 2008
@@ -195,7 +195,10 @@
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, &error);
+ secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ FALSE,
+ &error);
if (secrets) {
value = g_hash_table_lookup (secrets, NM_SETTING_WIRELESS_SECURITY_PSK);
if (value)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]