network-manager-applet r867 - in trunk: . src src/connection-editor src/gconf-helpers src/wireless-security
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r867 - in trunk: . src src/connection-editor src/gconf-helpers src/wireless-security
- Date: Wed, 27 Aug 2008 03:31:44 +0000 (UTC)
Author: dcbw
Date: Wed Aug 27 03:31:43 2008
New Revision: 867
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=867&view=rev
Log:
2008-08-26 Dan Williams <dcbw redhat com>
UUID updates. Requires NM svn 4013 or later, and VPN plugins 4018 or later.
* src/applet-device-gsm.c
src/applet-device-wifi.c
src/applet-device-cdma.c
src/applet-device-wired.c
- (*_new_auto_connection): add UUID
* src/gconf-helpers/gconf-upgrade.c
src/gconf-helpers/gconf-upgrade.h
- (nm_gconf_read_0_6_wireless_connection,
nm_gconf_read_0_6_vpn_connection): add UUID
- (nm_gconf_migrate_0_7_vpn_connections,
nm_gconf_migrate_0_7_connection_names): remove; anybody using an NM
this old should be shot
- (try_convert_leap, copy_keyring_to_8021x,
nm_gconf_migrate_0_7_wireless_security): UUIDs all around
- (nm_gconf_migrate_0_7_connection_uuid): add UUIDs to connections
- (nm_gconf_migrate_0_7_keyring_items): migrate keyring items from
'connection-name' or 'connection-id' to 'connection-uuid'
* src/gconf-helpers/nma-gconf-connection.c
- (get_id, constructor, dispose, finalize, get_secrets, update,
nma_gconf_connection_class_init, nma_gconf_connection_save): remove
id-related stuff
* src/gconf-helpers/gconf-helpers.c
src/gconf-helpers/gconf-helpers.h
- (nm_gconf_get_all_connections): add UUIDs to all connections, and
remove obsolete migration operations
- (nm_gconf_add_keyring_item, nm_gconf_write_connection,
nm_gconf_get_keyring_items): remove 'id' argument since the
connection now provides the UUID
* src/wireless-security/eap-method-leap.c
src/wireless-security/wireless-security.c
src/wireless-security/ws-dynamic-wep.c
src/wireless-security/eap-method-peap.c
src/wireless-security/eap-method-ttls.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/ws-wpa-eap.c
src/wireless-security/eap-method-tls.c
src/wireless-dialog.c
src/connection-editor/page-wireless-security.c
src/connection-editor/page-mobile.c
src/connection-editor/page-wired-security.c
src/connection-editor/page-dsl.c
src/wired-dialog.c
- Use UUIDs from the connection, not a separate 'id'
* src/connection-editor/nm-connection-list.c
- (create_new_connection_for_type, import_success_cb): add UUIDs for
newly created or imported connections
* src/vpn-password-dialog.c
- (nma_vpn_request_password): pass 'uuid' to auth dialog, not 'id'
Modified:
trunk/ChangeLog
trunk/src/applet-device-cdma.c
trunk/src/applet-device-gsm.c
trunk/src/applet-device-wifi.c
trunk/src/applet-device-wired.c
trunk/src/connection-editor/nm-connection-list.c
trunk/src/connection-editor/page-dsl.c
trunk/src/connection-editor/page-mobile.c
trunk/src/connection-editor/page-wired-security.c
trunk/src/connection-editor/page-wireless-security.c
trunk/src/gconf-helpers/gconf-helpers.c
trunk/src/gconf-helpers/gconf-helpers.h
trunk/src/gconf-helpers/gconf-upgrade.c
trunk/src/gconf-helpers/gconf-upgrade.h
trunk/src/gconf-helpers/nma-gconf-connection.c
trunk/src/vpn-password-dialog.c
trunk/src/wired-dialog.c
trunk/src/wireless-dialog.c
trunk/src/wireless-security/eap-method-leap.c
trunk/src/wireless-security/eap-method-leap.h
trunk/src/wireless-security/eap-method-peap.c
trunk/src/wireless-security/eap-method-peap.h
trunk/src/wireless-security/eap-method-simple.c
trunk/src/wireless-security/eap-method-simple.h
trunk/src/wireless-security/eap-method-tls.c
trunk/src/wireless-security/eap-method-tls.h
trunk/src/wireless-security/eap-method-ttls.c
trunk/src/wireless-security/eap-method-ttls.h
trunk/src/wireless-security/wireless-security.c
trunk/src/wireless-security/wireless-security.h
trunk/src/wireless-security/ws-dynamic-wep.c
trunk/src/wireless-security/ws-dynamic-wep.h
trunk/src/wireless-security/ws-leap.c
trunk/src/wireless-security/ws-leap.h
trunk/src/wireless-security/ws-wep-key.c
trunk/src/wireless-security/ws-wep-key.h
trunk/src/wireless-security/ws-wpa-eap.c
trunk/src/wireless-security/ws-wpa-eap.h
trunk/src/wireless-security/ws-wpa-psk.c
trunk/src/wireless-security/ws-wpa-psk.h
Modified: trunk/src/applet-device-cdma.c
==============================================================================
--- trunk/src/applet-device-cdma.c (original)
+++ trunk/src/applet-device-cdma.c Wed Aug 27 03:31:43 2008
@@ -34,6 +34,7 @@
#include <nm-setting-serial.h>
#include <nm-setting-ppp.h>
#include <nm-cdma-device.h>
+#include <nm-utils.h>
#include "applet.h"
#include "applet-device-cdma.h"
@@ -85,6 +86,7 @@
s_con->id = g_strdup (DEFAULT_CDMA_NAME);
s_con->type = g_strdup (NM_SETTING (s_cdma)->name);
s_con->autoconnect = FALSE;
+ s_con->uuid = nm_utils_uuid_generate ();
nm_connection_add_setting (connection, NM_SETTING (s_con));
return connection;
Modified: trunk/src/applet-device-gsm.c
==============================================================================
--- trunk/src/applet-device-gsm.c (original)
+++ trunk/src/applet-device-gsm.c Wed Aug 27 03:31:43 2008
@@ -35,6 +35,7 @@
#include <nm-setting-serial.h>
#include <nm-setting-ppp.h>
#include <nm-gsm-device.h>
+#include <nm-utils.h>
#include "applet.h"
#include "applet-device-gsm.h"
@@ -86,6 +87,7 @@
s_con->id = g_strdup (DEFAULT_GSM_NAME);
s_con->type = g_strdup (NM_SETTING (s_gsm)->name);
s_con->autoconnect = FALSE;
+ s_con->uuid = nm_utils_uuid_generate ();
nm_connection_add_setting (connection, NM_SETTING (s_con));
return connection;
Modified: trunk/src/applet-device-wifi.c
==============================================================================
--- trunk/src/applet-device-wifi.c (original)
+++ trunk/src/applet-device-wifi.c Wed Aug 27 03:31:43 2008
@@ -357,6 +357,8 @@
/* Only utoconnect APs that don't use the manufacturer default SSID. */
s_con->autoconnect = !is_manufacturer_default_ssid (ap_ssid);
+ s_con->uuid = nm_utils_uuid_generate ();
+
nm_connection_add_setting (connection, NM_SETTING (s_con));
out:
Modified: trunk/src/applet-device-wired.c
==============================================================================
--- trunk/src/applet-device-wired.c (original)
+++ trunk/src/applet-device-wired.c Wed Aug 27 03:31:43 2008
@@ -36,6 +36,7 @@
#include <nm-setting-8021x.h>
#include <nm-setting-pppoe.h>
#include <nm-device-ethernet.h>
+#include <nm-utils.h>
#include "applet.h"
#include "applet-device-wired.h"
@@ -81,6 +82,7 @@
s_con->id = g_strdup (DEFAULT_WIRED_NAME);
s_con->type = g_strdup (NM_SETTING (s_wired)->name);
s_con->autoconnect = TRUE;
+ s_con->uuid = nm_utils_uuid_generate ();
nm_connection_add_setting (connection, NM_SETTING (s_con));
return connection;
@@ -351,27 +353,22 @@
if (s_pppoe->password)
gtk_entry_set_text (info->password_entry, s_pppoe->password);
else {
- const char *connection_id;
+ GHashTable *secrets;
+ GError *error = NULL;
+ GValue *value;
/* Grab password from keyring if possible */
- connection_id = g_object_get_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG);
- if (connection_id) {
- GHashTable *secrets;
- GError *error = NULL;
- GValue *value;
-
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
- nm_setting_get_name (NM_SETTING (s_pppoe)),
- FALSE,
- &error);
- if (secrets) {
- value = g_hash_table_lookup (secrets, NM_SETTING_PPPOE_PASSWORD);
- if (value)
- gtk_entry_set_text (info->password_entry, g_value_get_string (value));
- g_hash_table_destroy (secrets);
- } else if (error)
- g_error_free (error);
- }
+ secrets = nm_gconf_get_keyring_items (connection,
+ nm_setting_get_name (NM_SETTING (s_pppoe)),
+ FALSE,
+ &error);
+ if (secrets) {
+ value = g_hash_table_lookup (secrets, NM_SETTING_PPPOE_PASSWORD);
+ if (value)
+ gtk_entry_set_text (info->password_entry, g_value_get_string (value));
+ g_hash_table_destroy (secrets);
+ } else if (error)
+ g_error_free (error);
}
}
Modified: trunk/src/connection-editor/nm-connection-list.c
==============================================================================
--- trunk/src/connection-editor/nm-connection-list.c (original)
+++ trunk/src/connection-editor/nm-connection-list.c Wed Aug 27 03:31:43 2008
@@ -55,6 +55,7 @@
#include <nm-setting-ppp.h>
#include <nm-setting-serial.h>
#include <nm-vpn-plugin-ui-interface.h>
+#include <nm-utils.h>
#include "nm-connection-editor.h"
#include "nm-connection-list.h"
@@ -743,6 +744,7 @@
connection = nm_connection_new ();
s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
+ s_con->uuid = nm_utils_uuid_generate ();
nm_connection_add_setting (connection, NM_SETTING (s_con));
if (ctype == NM_TYPE_SETTING_WIRED) {
@@ -1103,6 +1105,8 @@
g_free (s_con->type);
s_con->type = g_strdup (NM_SETTING_VPN_SETTING_NAME);
}
+ if (!s_con->uuid)
+ s_con->uuid = nm_utils_uuid_generate ();
s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN));
if (!s_vpn || !s_vpn->service_type || !strlen (s_vpn->service_type)) {
Modified: trunk/src/connection-editor/page-dsl.c
==============================================================================
--- trunk/src/connection-editor/page-dsl.c (original)
+++ trunk/src/connection-editor/page-dsl.c Wed Aug 27 03:31:43 2008
@@ -66,19 +66,17 @@
CEPageDslPrivate *priv = CE_PAGE_DSL_GET_PRIVATE (self);
NMSettingPPPOE *setting = priv->setting;
char *password = setting->password;
- const char *connection_id;
GHashTable *secrets = NULL;
if (setting->username)
gtk_entry_set_text (priv->username, setting->username);
/* Grab password from keyring if possible */
- connection_id = g_object_get_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG);
- if (!password && connection_id) {
+ if (!password) {
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
nm_setting_get_name (NM_SETTING (setting)),
FALSE,
&error);
Modified: trunk/src/connection-editor/page-mobile.c
==============================================================================
--- trunk/src/connection-editor/page-mobile.c (original)
+++ trunk/src/connection-editor/page-mobile.c Wed Aug 27 03:31:43 2008
@@ -86,15 +86,10 @@
static GHashTable *
get_secrets (NMConnection *connection, const char *setting_name)
{
- const char *connection_id;
GError *error = NULL;
GHashTable *secrets;
- connection_id = g_object_get_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG);
- if (!connection_id)
- return NULL;
-
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
setting_name,
FALSE,
&error);
Modified: trunk/src/connection-editor/page-wired-security.c
==============================================================================
--- trunk/src/connection-editor/page-wired-security.c (original)
+++ trunk/src/connection-editor/page-wired-security.c Wed Aug 27 03:31:43 2008
@@ -72,7 +72,6 @@
CEPage *parent;
CEPageWiredSecurityPrivate *priv;
const char *glade_file = GLADEDIR "/applet.glade";
- const char *connection_id;
NMSetting *setting;
self = CE_PAGE_WIRED_SECURITY (g_object_new (CE_TYPE_PAGE_WIRED_SECURITY, NULL));
@@ -85,8 +84,7 @@
setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
- connection_id = g_object_get_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG);
- priv->security = (WirelessSecurity *) ws_wpa_eap_new (glade_file, connection, connection_id);
+ priv->security = (WirelessSecurity *) ws_wpa_eap_new (glade_file, connection);
wireless_security_set_changed_notify (priv->security, stuff_changed, self);
priv->security_widget = wireless_security_get_widget (priv->security);
Modified: trunk/src/connection-editor/page-wireless-security.c
==============================================================================
--- trunk/src/connection-editor/page-wireless-security.c (original)
+++ trunk/src/connection-editor/page-wireless-security.c Wed Aug 27 03:31:43 2008
@@ -181,9 +181,6 @@
int item = 0;
const char *glade_file = GLADEDIR "/applet.glade";
GtkComboBox *combo;
- const char *connection_id;
-
- connection_id = g_object_get_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG);
self = CE_PAGE_WIRELESS_SECURITY (g_object_new (CE_TYPE_PAGE_WIRELESS_SECURITY, NULL));
parent = CE_PAGE (self);
@@ -250,9 +247,9 @@
WEPKeyType default_wep_type = WEP_KEY_TYPE_KEY;
if (default_type == NMU_SEC_STATIC_WEP)
- default_wep_type = ws_wep_guess_key_type (connection, connection_id);
+ default_wep_type = ws_wep_guess_key_type (connection);
- ws_wep = ws_wep_key_new (glade_file, connection, connection_id, WEP_KEY_TYPE_KEY, FALSE);
+ ws_wep = ws_wep_key_new (glade_file, connection, WEP_KEY_TYPE_KEY, FALSE);
if (ws_wep) {
add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
&iter, _("WEP 40/128-bit Key"));
@@ -261,7 +258,7 @@
item++;
}
- ws_wep = ws_wep_key_new (glade_file, connection, connection_id, WEP_KEY_TYPE_PASSPHRASE, FALSE);
+ ws_wep = ws_wep_key_new (glade_file, connection, WEP_KEY_TYPE_PASSPHRASE, FALSE);
if (ws_wep) {
add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
&iter, _("WEP 128-bit Passphrase"));
@@ -274,7 +271,7 @@
if (nm_utils_security_valid (NMU_SEC_LEAP, dev_caps, FALSE, is_adhoc, 0, 0, 0)) {
WirelessSecurityLEAP *ws_leap;
- ws_leap = ws_leap_new (glade_file, connection, connection_id);
+ ws_leap = ws_leap_new (glade_file, connection);
if (ws_leap) {
add_security_item (self, WIRELESS_SECURITY (ws_leap), sec_model,
&iter, _("LEAP"));
@@ -287,7 +284,7 @@
if (nm_utils_security_valid (NMU_SEC_DYNAMIC_WEP, dev_caps, FALSE, is_adhoc, 0, 0, 0)) {
WirelessSecurityDynamicWEP *ws_dynamic_wep;
- ws_dynamic_wep = ws_dynamic_wep_new (glade_file, connection, connection_id);
+ ws_dynamic_wep = ws_dynamic_wep_new (glade_file, connection);
if (ws_dynamic_wep) {
add_security_item (self, WIRELESS_SECURITY (ws_dynamic_wep), sec_model,
&iter, _("Dynamic WEP (802.1x)"));
@@ -301,7 +298,7 @@
|| nm_utils_security_valid (NMU_SEC_WPA2_PSK, dev_caps, FALSE, is_adhoc, 0, 0, 0)) {
WirelessSecurityWPAPSK *ws_wpa_psk;
- ws_wpa_psk = ws_wpa_psk_new (glade_file, connection, connection_id);
+ ws_wpa_psk = ws_wpa_psk_new (glade_file, connection);
if (ws_wpa_psk) {
add_security_item (self, WIRELESS_SECURITY (ws_wpa_psk), sec_model,
&iter, _("WPA & WPA2 Personal"));
@@ -315,7 +312,7 @@
|| nm_utils_security_valid (NMU_SEC_WPA2_ENTERPRISE, dev_caps, FALSE, is_adhoc, 0, 0, 0)) {
WirelessSecurityWPAEAP *ws_wpa_eap;
- ws_wpa_eap = ws_wpa_eap_new (glade_file, connection, connection_id);
+ ws_wpa_eap = ws_wpa_eap_new (glade_file, connection);
if (ws_wpa_eap) {
add_security_item (self, WIRELESS_SECURITY (ws_wpa_eap), sec_model,
&iter, _("WPA & WPA2 Enterprise"));
Modified: trunk/src/gconf-helpers/gconf-helpers.c
==============================================================================
--- trunk/src/gconf-helpers/gconf-helpers.c (original)
+++ trunk/src/gconf-helpers/gconf-helpers.c Wed Aug 27 03:31:43 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw redhat com>
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2005 Red Hat, Inc.
+ * (C) Copyright 2005 - 2008 Red Hat, Inc.
*/
#include <string.h>
@@ -852,9 +852,8 @@
{
GSList *connections;
+ nm_gconf_migrate_0_7_connection_uuid (client);
nm_gconf_migrate_0_7_keyring_items (client);
- nm_gconf_migrate_0_7_connection_names (client);
- nm_gconf_migrate_0_7_vpn_connections (client);
nm_gconf_migrate_0_7_wireless_security (client);
nm_gconf_migrate_0_7_netmask_to_prefix (client);
nm_gconf_migrate_0_7_ip4_method (client);
@@ -1120,7 +1119,7 @@
void
-nm_gconf_add_keyring_item (const char *connection_id,
+nm_gconf_add_keyring_item (const char *connection_uuid,
const char *connection_name,
const char *setting_name,
const char *setting_key,
@@ -1131,7 +1130,7 @@
GnomeKeyringAttributeList *attrs = NULL;
guint32 id = 0;
- g_return_if_fail (connection_id != NULL);
+ g_return_if_fail (connection_uuid != NULL);
g_return_if_fail (setting_name != NULL);
g_return_if_fail (setting_key != NULL);
g_return_if_fail (secret != NULL);
@@ -1143,8 +1142,8 @@
attrs = gnome_keyring_attribute_list_new ();
gnome_keyring_attribute_list_append_string (attrs,
- KEYRING_CID_TAG,
- connection_id);
+ KEYRING_UUID_TAG,
+ connection_uuid);
gnome_keyring_attribute_list_append_string (attrs,
KEYRING_SN_TAG,
setting_name);
@@ -1168,7 +1167,7 @@
NMConnection *connection;
GConfClient *client;
const char *dir;
- const char *connection_id;
+ const char *connection_uuid;
const char *connection_name;
} CopyOneSettingValueInfo;
@@ -1213,7 +1212,7 @@
if (secret) {
if (str_val && strlen (str_val))
- nm_gconf_add_keyring_item (info->connection_id,
+ nm_gconf_add_keyring_item (info->connection_uuid,
info->connection_name,
setting->name,
key,
@@ -1324,7 +1323,7 @@
value = g_object_get_data (G_OBJECT (info->connection), tag);
if (value) {
- nm_gconf_add_keyring_item (info->connection_id,
+ nm_gconf_add_keyring_item (info->connection_uuid,
info->connection_name,
NM_SETTING_802_1X_SETTING_NAME,
tag,
@@ -1394,8 +1393,7 @@
void
nm_gconf_write_connection (NMConnection *connection,
GConfClient *client,
- const char *dir,
- const char *connection_id)
+ const char *dir)
{
NMSettingConnection *s_con;
CopyOneSettingValueInfo info;
@@ -1403,7 +1401,6 @@
g_return_if_fail (NM_IS_CONNECTION (connection));
g_return_if_fail (client != NULL);
g_return_if_fail (dir != NULL);
- g_return_if_fail (connection_id != NULL);
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
if (!s_con)
@@ -1412,7 +1409,7 @@
info.connection = connection;
info.client = client;
info.dir = dir;
- info.connection_id = connection_id;
+ info.connection_uuid = s_con->uuid;
info.connection_name = s_con->id;
nm_connection_for_each_setting_value (connection,
copy_one_setting_value_to_gconf,
@@ -1529,7 +1526,6 @@
GHashTable *
nm_gconf_get_keyring_items (NMConnection *connection,
- const char *connection_id,
const char *setting_name,
gboolean include_private_passwords,
GError **error)
@@ -1542,7 +1538,6 @@
const char *connection_name;
g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (connection_id != NULL, NULL);
g_return_val_if_fail (setting_name != NULL, NULL);
g_return_val_if_fail (error != NULL, NULL);
g_return_val_if_fail (*error == NULL, NULL);
@@ -1550,13 +1545,14 @@
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
g_assert (s_con);
g_assert (s_con->id);
+ g_assert (s_con->uuid);
connection_name = s_con->id;
ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
&found_list,
- KEYRING_CID_TAG,
+ KEYRING_UUID_TAG,
GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
- connection_id,
+ s_con->uuid,
KEYRING_SN_TAG,
GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
setting_name,
@@ -1678,8 +1674,5 @@
g_object_set_data_full (od, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG,
g_strdup (g_object_get_data (oc, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG)), g_free);
- g_object_set_data_full (od, NMA_CONNECTION_ID_TAG,
- g_strdup (g_object_get_data (oc, NMA_CONNECTION_ID_TAG)), g_free);
-
return dup;
}
Modified: trunk/src/gconf-helpers/gconf-helpers.h
==============================================================================
--- trunk/src/gconf-helpers/gconf-helpers.h (original)
+++ trunk/src/gconf-helpers/gconf-helpers.h Wed Aug 27 03:31:43 2008
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw redhat com>
@@ -43,11 +44,10 @@
#define NMA_PRIVATE_KEY_PASSWORD_TAG "nma-private-key-password"
#define NMA_PATH_PHASE2_PRIVATE_KEY_TAG "nma-path-phase2-private-key"
#define NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG "nma-phase2-private-key-password"
-#define NMA_CONNECTION_ID_TAG "nma-connection-id"
NMConnection *nm_gconf_connection_duplicate (NMConnection *connection);
-#define KEYRING_CID_TAG "connection-id"
+#define KEYRING_UUID_TAG "connection-uuid"
#define KEYRING_SN_TAG "setting-name"
#define KEYRING_SK_TAG "setting-key"
@@ -202,11 +202,10 @@
void
nm_gconf_write_connection (NMConnection *connection,
GConfClient *client,
- const char *dir,
- const char *connection_id);
+ const char *dir);
void
-nm_gconf_add_keyring_item (const char *connection_id,
+nm_gconf_add_keyring_item (const char *connection_uuid,
const char *connection_name,
const char *setting_name,
const char *setting_key,
@@ -214,7 +213,6 @@
GHashTable *
nm_gconf_get_keyring_items (NMConnection *connection,
- const char *connection_id,
const char *setting_name,
gboolean include_private_passwords,
GError **error);
Modified: trunk/src/gconf-helpers/gconf-upgrade.c
==============================================================================
--- trunk/src/gconf-helpers/gconf-upgrade.c (original)
+++ trunk/src/gconf-helpers/gconf-upgrade.c Wed Aug 27 03:31:43 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw redhat com>
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2005 Red Hat, Inc.
+ * (C) Copyright 2005 - 2008 Red Hat, Inc.
*/
#ifdef HAVE_CONFIG_H
@@ -362,6 +362,7 @@
s_con->type = g_strdup ("802-11-wireless");
s_con->autoconnect = (timestamp != 0);
s_con->timestamp = timestamp;
+ s_con->uuid = nm_utils_uuid_generate ();
s_wireless = (NMSettingWireless *)nm_setting_wireless_new ();
s_wireless->ssid = g_byte_array_new ();
@@ -555,6 +556,7 @@
s_con = (NMSettingConnection *)nm_setting_connection_new ();
s_con->id = id;
s_con->type = g_strdup ("vpn");
+ s_con->uuid = nm_utils_uuid_generate ();
s_vpn = (NMSettingVPN *)nm_setting_vpn_new ();
s_vpn->service_type = service_name;
@@ -585,16 +587,13 @@
}
static void
-nm_gconf_write_0_6_connection (NMConnection *conn, GConfClient *client, int n)
+nm_gconf_write_0_6_connection (NMConnection *connection, GConfClient *client, int n)
{
char *dir;
- char *id;
dir = g_strdup_printf ("%s/%d", GCONF_PATH_CONNECTIONS, n);
- id = g_strdup_printf ("%d", n);
- nm_gconf_write_connection (conn, client, dir, id);
+ nm_gconf_write_connection (connection, client, dir);
g_free (dir);
- g_free (id);
}
#define GCONF_PATH_0_6_WIRELESS_NETWORKS "/system/networking/wireless/networks"
@@ -632,66 +631,6 @@
gconf_client_suggest_sync (client, NULL);
}
-/* Converting NMSetting objects to GObject resulted in a change of the
- * service_type key to service-type. Fix that up.
- */
-void
-nm_gconf_migrate_0_7_vpn_connections (GConfClient *client)
-{
- GSList *connections, *iter;
-
- connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
- for (iter = connections; iter; iter = iter->next) {
- char *value = NULL;
-
- if (nm_gconf_get_string_helper (client, iter->data, "service_type", "vpn", &value)) {
- char *old_key;
-
- nm_gconf_set_string_helper (client, iter->data, "service-type", "vpn", value);
- old_key = g_strdup_printf ("%s/vpn/service_type", (const char *) iter->data);
- gconf_client_unset (client, old_key, NULL);
- g_free (old_key);
- }
- }
- free_slist (connections);
-
- gconf_client_suggest_sync (client, NULL);
-}
-
-/* Changing the connection settings' 'name' property -> 'id' requires a rename
- * of the GConf key too.
- */
-void
-nm_gconf_migrate_0_7_connection_names (GConfClient *client)
-{
- GSList *connections, *iter;
-
- connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
- for (iter = connections; iter; iter = iter->next) {
- char *id = NULL;
-
- if (nm_gconf_get_string_helper (client, iter->data, "id", NM_SETTING_CONNECTION_SETTING_NAME, &id))
- g_free (id);
- else {
- char *value = NULL;
-
- if (nm_gconf_get_string_helper (client, iter->data, "name", NM_SETTING_CONNECTION_SETTING_NAME, &value)) {
- char *old_key;
-
- nm_gconf_set_string_helper (client, iter->data, "id", NM_SETTING_CONNECTION_SETTING_NAME, value);
- g_free (value);
-
- old_key = g_strdup_printf ("%s/" NM_SETTING_CONNECTION_SETTING_NAME "/name", (const char *) iter->data);
- gconf_client_unset (client, old_key, NULL);
- g_free (old_key);
- }
- }
- }
- free_slist (connections);
-
- gconf_client_suggest_sync (client, NULL);
-}
-
static void
unset_ws_key (GConfClient *client, const char *dir, const char *key)
{
@@ -750,7 +689,7 @@
}
static gboolean
-try_convert_leap (GConfClient *client, const char *dir, const char *connection_id)
+try_convert_leap (GConfClient *client, const char *dir, const char *uuid)
{
char *val = NULL;
GnomeKeyringResult ret;
@@ -819,9 +758,9 @@
/* Copy the LEAP password */
ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
&found_list,
- KEYRING_CID_TAG,
+ KEYRING_UUID_TAG,
GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
- val,
+ uuid,
KEYRING_SN_TAG,
GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
@@ -833,7 +772,7 @@
goto done;
found = (GnomeKeyringFound *) found_list->data;
- nm_gconf_add_keyring_item (connection_id,
+ nm_gconf_add_keyring_item (uuid,
val,
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD,
@@ -849,7 +788,7 @@
static void
copy_keyring_to_8021x (GConfClient *client,
const char *dir,
- const char *connection_id,
+ const char *uuid,
const char *key)
{
char *name = NULL;
@@ -866,9 +805,9 @@
/* Copy the LEAP password */
ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
&found_list,
- KEYRING_CID_TAG,
+ KEYRING_UUID_TAG,
GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
- connection_id,
+ uuid,
KEYRING_SN_TAG,
GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
@@ -880,7 +819,7 @@
goto done;
found = (GnomeKeyringFound *) found_list->data;
- nm_gconf_add_keyring_item (connection_id, name, NM_SETTING_802_1X_SETTING_NAME, key, found->secret);
+ nm_gconf_add_keyring_item (uuid, name, NM_SETTING_802_1X_SETTING_NAME, key, found->secret);
gnome_keyring_item_delete_sync (found->keyring, found->item_id);
@@ -898,7 +837,7 @@
for (iter = connections; iter; iter = iter->next) {
char *key_mgmt = NULL;
GSList *eap = NULL;
- char *id = g_path_get_basename ((const char *) iter->data);
+ char *uuid = NULL;
if (!nm_gconf_get_string_helper (client, iter->data,
NM_SETTING_WIRELESS_SECURITY_KEY_MGMT,
@@ -906,6 +845,12 @@
&key_mgmt))
goto next;
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid))
+ goto next;
+
/* Only convert 802.1x-based connections */
if (strcmp (key_mgmt, "ieee8021x") && strcmp (key_mgmt, "wpa-eap")) {
g_free (key_mgmt);
@@ -914,7 +859,7 @@
g_free (key_mgmt);
/* Leap gets converted differently */
- if (try_convert_leap (client, iter->data, id))
+ if (try_convert_leap (client, iter->data, uuid))
goto next;
/* Otherwise straight 802.1x */
@@ -948,82 +893,20 @@
copy_bool_to_8021x (client, iter->data, NMA_CA_CERT_IGNORE_TAG);
copy_bool_to_8021x (client, iter->data, NMA_PHASE2_CA_CERT_IGNORE_TAG);
- copy_keyring_to_8021x (client, iter->data, id, NM_SETTING_802_1X_PASSWORD);
- copy_keyring_to_8021x (client, iter->data, id, NM_SETTING_802_1X_PIN);
- copy_keyring_to_8021x (client, iter->data, id, NM_SETTING_802_1X_PSK);
- copy_keyring_to_8021x (client, iter->data, id, NMA_PRIVATE_KEY_PASSWORD_TAG);
- copy_keyring_to_8021x (client, iter->data, id, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG);
+ copy_keyring_to_8021x (client, iter->data, uuid, NM_SETTING_802_1X_PASSWORD);
+ copy_keyring_to_8021x (client, iter->data, uuid, NM_SETTING_802_1X_PIN);
+ copy_keyring_to_8021x (client, iter->data, uuid, NM_SETTING_802_1X_PSK);
+ copy_keyring_to_8021x (client, iter->data, uuid, NMA_PRIVATE_KEY_PASSWORD_TAG);
+ copy_keyring_to_8021x (client, iter->data, uuid, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG);
next:
- g_free (id);
+ g_free (uuid);
}
free_slist (connections);
gconf_client_suggest_sync (client, NULL);
}
-/*
- * Move all keyring items to use 'connection-id' instead of 'connection-name'
- */
-void
-nm_gconf_migrate_0_7_keyring_items (GConfClient *client)
-{
- GSList *connections;
- GSList *iter;
-
- connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
- for (iter = connections; iter; iter = g_slist_next (iter)) {
- GnomeKeyringResult ret;
- GList *found_list = NULL, *elt;
- char *name = NULL;
- char *id = g_path_get_basename (iter->data);
-
- if (!nm_gconf_get_string_helper (client, iter->data,
- "id",
- NM_SETTING_CONNECTION_SETTING_NAME,
- &name))
- goto next;
-
- ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
- &found_list,
- "connection-name",
- GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
- name,
- NULL);
- if ((ret != GNOME_KEYRING_RESULT_OK) || (g_list_length (found_list) == 0))
- goto next;
-
- for (elt = found_list; elt; elt = g_list_next (elt)) {
- GnomeKeyringFound *found = (GnomeKeyringFound *) elt->data;
- char *setting_name = NULL;
- char *setting_key = NULL;
- int i;
-
- for (i = 0; found->attributes && (i < found->attributes->len); i++) {
- GnomeKeyringAttribute *attr;
-
- attr = &(gnome_keyring_attribute_list_index (found->attributes, i));
- if (!strcmp (attr->name, KEYRING_SN_TAG) && (attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING))
- setting_name = attr->value.string;
- else if (!strcmp (attr->name, KEYRING_SK_TAG) && (attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING))
- setting_key = attr->value.string;
- }
-
- if (setting_name && setting_key) {
- nm_gconf_add_keyring_item (id, name, setting_name, setting_key, found->secret);
- ret = gnome_keyring_item_delete_sync (found->keyring, found->item_id);
- }
- }
- gnome_keyring_found_list_free (found_list);
-
- next:
- g_free (name);
- g_free (id);
- }
-
-
-}
-
void
nm_gconf_migrate_0_7_netmask_to_prefix (GConfClient *client)
{
@@ -1467,3 +1350,151 @@
gconf_client_suggest_sync (client, NULL);
}
+void
+nm_gconf_migrate_0_7_connection_uuid (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *uuid = NULL;
+
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid)) {
+ /* Give the connection a UUID */
+ uuid = nm_utils_uuid_generate ();
+ nm_gconf_set_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ uuid);
+ }
+
+ g_free (uuid);
+ }
+ free_slist (connections);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+static void
+migrate_openvpn_secrets (const char *name, const char *uuid)
+{
+ int status;
+ GList *list = NULL;
+ GList *iter;
+
+ status = gnome_keyring_find_network_password_sync (g_get_user_name (), /* user */
+ NULL, /* domain */
+ name, /* server */
+ NULL, /* object */
+ "org.freedesktop.NetworkManager.openvpn", /* protocol */
+ NULL, /* authtype */
+ 0, /* port */
+ &list);
+ if (status != GNOME_KEYRING_RESULT_OK || !g_list_length (list))
+ return;
+
+ /* Go through all passwords and assign to appropriate variable */
+ for (iter = list; iter; iter = iter->next) {
+ GnomeKeyringNetworkPasswordData *found = iter->data;
+
+ /* Ignore session items */
+ if (strcmp (found->keyring, "session") != 0)
+ nm_gconf_add_keyring_item (uuid, name, NM_SETTING_VPN_SETTING_NAME, found->object, found->password);
+
+ gnome_keyring_item_delete_sync (found->keyring, found->item_id);
+ }
+
+ gnome_keyring_network_password_list_free (list);
+}
+
+/* Move keyring items from 'connection-id' or 'connection-name' to 'connection-uuid' */
+void
+nm_gconf_migrate_0_7_keyring_items (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ GnomeKeyringResult ret;
+ GList *found_list = NULL, *found_iter;
+ char *uuid = NULL;
+ char *old_id = NULL;
+ char *name = NULL;
+
+ /* Get the connection's UUID and name */
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid))
+ goto next;
+
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_ID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &name))
+ goto next;
+
+ old_id = g_path_get_basename ((const char *) iter->data);
+
+ /* Move any keyring keys associated with the connection */
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ "connection-id",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ old_id,
+ NULL);
+ if (ret != GNOME_KEYRING_RESULT_OK) {
+ /* Or even older keyring items */
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ "connection-name",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ name,
+ NULL);
+ if (ret != GNOME_KEYRING_RESULT_OK)
+ goto next;
+ }
+
+ for (found_iter = found_list; found_iter; found_iter = g_list_next (found_iter)) {
+ GnomeKeyringFound *found = (GnomeKeyringFound *) found_iter->data;
+ char *setting_name = NULL;
+ char *setting_key = NULL;
+ int i;
+
+ for (i = 0; found->attributes && (i < found->attributes->len); i++) {
+ GnomeKeyringAttribute *attr;
+
+ attr = &(gnome_keyring_attribute_list_index (found->attributes, i));
+ if (!strcmp (attr->name, KEYRING_SN_TAG) && (attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING)) {
+ /* Migrate old vpn-properties secrets too */
+ if (!strcmp (attr->value.string, "vpn-properties"))
+ setting_name = NM_SETTING_VPN_SETTING_NAME;
+ else
+ setting_name = attr->value.string;
+ } else if (!strcmp (attr->name, KEYRING_SK_TAG) && (attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING))
+ setting_key = attr->value.string;
+ }
+
+ if (setting_name && setting_key) {
+ nm_gconf_add_keyring_item (uuid, name, setting_name, setting_key, found->secret);
+ ret = gnome_keyring_item_delete_sync (found->keyring, found->item_id);
+ }
+ }
+ gnome_keyring_found_list_free (found_list);
+
+ /* Old OpenVPN secrets have a different keyring style */
+ migrate_openvpn_secrets (name, uuid);
+
+ next:
+ g_free (name);
+ g_free (old_id);
+ g_free (uuid);
+ }
+ free_slist (connections);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
Modified: trunk/src/gconf-helpers/gconf-upgrade.h
==============================================================================
--- trunk/src/gconf-helpers/gconf-upgrade.h (original)
+++ trunk/src/gconf-helpers/gconf-upgrade.h Wed Aug 27 03:31:43 2008
@@ -26,10 +26,6 @@
void nm_gconf_migrate_0_6_connections (GConfClient *client);
-void nm_gconf_migrate_0_7_vpn_connections (GConfClient *client);
-
-void nm_gconf_migrate_0_7_connection_names (GConfClient *client);
-
void nm_gconf_migrate_0_7_wireless_security (GConfClient *client);
void nm_gconf_migrate_0_7_keyring_items (GConfClient *client);
@@ -46,5 +42,7 @@
void nm_gconf_migrate_0_7_openvpn_properties (GConfClient *client);
+void nm_gconf_migrate_0_7_connection_uuid (GConfClient *client);
+
#endif /* GCONF_UPGRADE_H */
Modified: trunk/src/gconf-helpers/nma-gconf-connection.c
==============================================================================
--- trunk/src/gconf-helpers/nma-gconf-connection.c (original)
+++ trunk/src/gconf-helpers/nma-gconf-connection.c Wed Aug 27 03:31:43 2008
@@ -16,7 +16,6 @@
typedef struct {
GConfClient *client;
char *dir;
- char *id;
gboolean disposed;
} NMAGConfConnectionPrivate;
@@ -97,8 +96,7 @@
connection = nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (self));
nm_gconf_write_connection (connection,
priv->client,
- priv->dir,
- priv->id);
+ priv->dir);
gconf_client_notify (priv->client, priv->dir);
gconf_client_suggest_sync (priv->client, NULL);
}
@@ -204,7 +202,6 @@
GHashTable *secrets = NULL;
NMSettingConnection *s_con;
NMSetting *setting;
- const char *id;
connection = nm_exported_connection_get_connection (exported);
@@ -249,8 +246,7 @@
settings = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, (GDestroyNotify) g_hash_table_destroy);
- id = nm_exported_connection_get_id (exported);
- secrets = nm_gconf_get_keyring_items (connection, id, setting_name, FALSE, &error);
+ secrets = nm_gconf_get_keyring_items (connection, setting_name, FALSE, &error);
if (!secrets) {
if (error) {
nm_warning ("Error getting secrets: %s", error->message);
@@ -286,12 +282,6 @@
context);
}
-static const char *
-get_id (NMExportedConnection *self)
-{
- return NMA_GCONF_CONNECTION_GET_PRIVATE (self)->id;
-}
-
static gboolean
update (NMExportedConnection *exported, GHashTable *new_settings, GError **error)
{
@@ -306,10 +296,7 @@
g_type_name (nm_connection_lookup_setting_type_by_quark ((*error)->domain)),
(*error)->message, (*error)->code);
} else {
- nm_gconf_write_connection (tmp,
- priv->client,
- priv->dir,
- priv->id);
+ nm_gconf_write_connection (tmp, priv->client, priv->dir);
g_object_unref (tmp);
gconf_client_notify (priv->client, priv->dir);
@@ -369,9 +356,6 @@
connection = nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (object));
- priv->id = g_path_get_basename (priv->dir);
- g_object_set_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG, priv->id);
-
utils_fill_connection_certs (connection);
if (!nm_connection_verify (connection, &error)) {
utils_clear_filled_connection_certs (connection);
@@ -409,17 +393,11 @@
dispose (GObject *object)
{
NMAGConfConnectionPrivate *priv = NMA_GCONF_CONNECTION_GET_PRIVATE (object);
- NMConnection *connection;
if (priv->disposed)
return;
-
priv->disposed = TRUE;
- connection = nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (object));
- if (connection)
- g_object_set_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG, NULL);
-
g_object_unref (priv->client);
G_OBJECT_CLASS (nma_gconf_connection_parent_class)->dispose (object);
@@ -430,7 +408,6 @@
{
NMAGConfConnectionPrivate *priv = NMA_GCONF_CONNECTION_GET_PRIVATE (object);
- g_free (priv->id);
g_free (priv->dir);
G_OBJECT_CLASS (nma_gconf_connection_parent_class)->finalize (object);
@@ -493,7 +470,6 @@
connection_class->get_settings = get_settings;
connection_class->get_secrets = get_secrets;
- connection_class->get_id = get_id;
connection_class->update = update;
connection_class->delete = delete;
Modified: trunk/src/vpn-password-dialog.c
==============================================================================
--- trunk/src/vpn-password-dialog.c (original)
+++ trunk/src/vpn-password-dialog.c Wed Aug 27 03:31:43 2008
@@ -172,8 +172,8 @@
DBusGMethodInvocation *context)
{
const char *argv[] = { NULL /*"/usr/libexec/nm-vpnc-auth-dialog"*/,
- "-i", NULL /*"1"*/,
- "-n", NULL /*"davidznet42"*/,
+ "-u", NULL /*"2a5d52b5-95b4-4431-b96e-3dd46128f9a7"*/,
+ "-n", NULL /*"davidznet42"*/,
"-s", NULL /*"org.freedesktop.vpnc"*/,
"-r",
NULL
@@ -216,7 +216,7 @@
/* Fix up parameters with what we got */
argv[0] = auth_dialog_binary;
- argv[2] = nm_exported_connection_get_id (exported);
+ argv[2] = s_con->uuid;
argv[4] = s_con->id;
argv[6] = s_vpn->service_type;
if (!retry)
@@ -269,9 +269,8 @@
g_io_channel_set_encoding (child_stdout_channel, NULL, NULL);
/* recurse mainloop here until the child is finished (child_status is set in child_finished_cb) */
- while (child_status == -1) {
+ while (child_status == -1)
g_main_context_iteration (NULL, TRUE);
- }
g_spawn_close_pid (child_pid);
g_source_remove (child_stdout_channel_eventid);
Modified: trunk/src/wired-dialog.c
==============================================================================
--- trunk/src/wired-dialog.c (original)
+++ trunk/src/wired-dialog.c Wed Aug 27 03:31:43 2008
@@ -41,10 +41,8 @@
GList *children;
GList *iter;
WirelessSecurity *security;
- const char *id;
- id = g_object_get_data (G_OBJECT (connection), NMA_CONNECTION_ID_TAG);
- security = (WirelessSecurity *) ws_wpa_eap_new (glade_file, connection, id);
+ security = (WirelessSecurity *) ws_wpa_eap_new (glade_file, connection);
/* Remove any previous wireless security widgets */
children = gtk_container_get_children (GTK_CONTAINER (box));
Modified: trunk/src/wireless-dialog.c
==============================================================================
--- trunk/src/wireless-dialog.c (original)
+++ trunk/src/wireless-dialog.c Wed Aug 27 03:31:43 2008
@@ -686,7 +686,6 @@
int item = 0;
NMSettingWireless *s_wireless = NULL;
gboolean is_adhoc;
- char *connection_id = NULL;
g_return_val_if_fail (self != NULL, FALSE);
@@ -719,8 +718,6 @@
wsec = NULL;
if (wsec)
default_type = get_default_type_for_security (wsec, !!priv->ap, ap_flags, dev_caps);
-
- connection_id = g_object_get_data (G_OBJECT (priv->connection), NMA_CONNECTION_ID_TAG);
}
sec_model = gtk_list_store_new (2, G_TYPE_STRING, wireless_security_get_g_type ());
@@ -744,9 +741,9 @@
WEPKeyType default_wep_type = WEP_KEY_TYPE_KEY;
if (default_type == NMU_SEC_STATIC_WEP)
- default_wep_type = ws_wep_guess_key_type (priv->connection, connection_id);
+ default_wep_type = ws_wep_guess_key_type (priv->connection);
- ws_wep = ws_wep_key_new (priv->glade_file, priv->connection, connection_id, WEP_KEY_TYPE_KEY, priv->adhoc_create);
+ ws_wep = ws_wep_key_new (priv->glade_file, priv->connection, WEP_KEY_TYPE_KEY, priv->adhoc_create);
if (ws_wep) {
add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
&iter, _("WEP 40/128-bit Key"));
@@ -755,7 +752,7 @@
item++;
}
- ws_wep = ws_wep_key_new (priv->glade_file, priv->connection, connection_id, WEP_KEY_TYPE_PASSPHRASE, priv->adhoc_create);
+ ws_wep = ws_wep_key_new (priv->glade_file, priv->connection, WEP_KEY_TYPE_PASSPHRASE, priv->adhoc_create);
if (ws_wep) {
add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
&iter, _("WEP 128-bit Passphrase"));
@@ -772,7 +769,7 @@
&& ((!ap_wpa && !ap_rsn) || !(dev_caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN)))) {
WirelessSecurityLEAP *ws_leap;
- ws_leap = ws_leap_new (priv->glade_file, priv->connection, connection_id);
+ ws_leap = ws_leap_new (priv->glade_file, priv->connection);
if (ws_leap) {
add_security_item (self, WIRELESS_SECURITY (ws_leap), sec_model,
&iter, _("LEAP"));
@@ -785,7 +782,7 @@
if (nm_utils_security_valid (NMU_SEC_DYNAMIC_WEP, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
WirelessSecurityDynamicWEP *ws_dynamic_wep;
- ws_dynamic_wep = ws_dynamic_wep_new (priv->glade_file, priv->connection, connection_id);
+ ws_dynamic_wep = ws_dynamic_wep_new (priv->glade_file, priv->connection);
if (ws_dynamic_wep) {
add_security_item (self, WIRELESS_SECURITY (ws_dynamic_wep), sec_model,
&iter, _("Dynamic WEP (802.1x)"));
@@ -799,7 +796,7 @@
|| nm_utils_security_valid (NMU_SEC_WPA2_PSK, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
WirelessSecurityWPAPSK *ws_wpa_psk;
- ws_wpa_psk = ws_wpa_psk_new (priv->glade_file, priv->connection, connection_id);
+ ws_wpa_psk = ws_wpa_psk_new (priv->glade_file, priv->connection);
if (ws_wpa_psk) {
add_security_item (self, WIRELESS_SECURITY (ws_wpa_psk), sec_model,
&iter, _("WPA & WPA2 Personal"));
@@ -813,7 +810,7 @@
|| nm_utils_security_valid (NMU_SEC_WPA2_ENTERPRISE, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
WirelessSecurityWPAEAP *ws_wpa_eap;
- ws_wpa_eap = ws_wpa_eap_new (priv->glade_file, priv->connection, connection_id);
+ ws_wpa_eap = ws_wpa_eap_new (priv->glade_file, priv->connection);
if (ws_wpa_eap) {
add_security_item (self, WIRELESS_SECURITY (ws_wpa_eap), sec_model,
&iter, _("WPA & WPA2 Enterprise"));
@@ -973,6 +970,7 @@
s_con = (NMSettingConnection *) nm_setting_connection_new ();
s_con->type = g_strdup (NM_SETTING_WIRELESS_SETTING_NAME);
+ s_con->uuid = nm_utils_uuid_generate ();
nm_connection_add_setting (connection, (NMSetting *) s_con);
s_wireless = (NMSettingWireless *) nm_setting_wireless_new ();
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 Wed Aug 27 03:31:43 2008
@@ -112,8 +112,7 @@
EAPMethodLEAP *
eap_method_leap_new (const char *glade_file,
WirelessSecurity *parent,
- NMConnection *connection,
- const char *connection_id)
+ NMConnection *connection)
{
EAPMethodLEAP *method;
GtkWidget *widget;
@@ -165,12 +164,12 @@
(GCallback) wireless_security_changed_cb,
parent);
/* Fill secrets, if any */
- if (connection && connection_id) {
+ if (connection) {
GHashTable *secrets;
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
NM_SETTING_802_1X_SETTING_NAME,
TRUE,
&error);
Modified: trunk/src/wireless-security/eap-method-leap.h
==============================================================================
--- trunk/src/wireless-security/eap-method-leap.h (original)
+++ trunk/src/wireless-security/eap-method-leap.h Wed Aug 27 03:31:43 2008
@@ -31,8 +31,7 @@
EAPMethodLEAP * eap_method_leap_new (const char *glade_file,
WirelessSecurity *parent,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
#endif /* EAP_METHOD_LEAP_H */
Modified: trunk/src/wireless-security/eap-method-peap.c
==============================================================================
--- trunk/src/wireless-security/eap-method-peap.c (original)
+++ trunk/src/wireless-security/eap-method-peap.c Wed Aug 27 03:31:43 2008
@@ -289,8 +289,7 @@
static GtkWidget *
inner_auth_combo_init (EAPMethodPEAP *method,
const char *glade_file,
- NMConnection *connection,
- const char *connection_id)
+ NMConnection *connection)
{
GladeXML *xml = EAP_METHOD (method)->xml;
GtkWidget *combo;
@@ -304,7 +303,6 @@
em_mschap_v2 = eap_method_simple_new (glade_file,
method->sec_parent,
connection,
- connection_id,
EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
@@ -316,7 +314,6 @@
em_md5 = eap_method_simple_new (glade_file,
method->sec_parent,
connection,
- connection_id,
EAP_METHOD_SIMPLE_TYPE_MD5);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
@@ -341,8 +338,7 @@
EAPMethodPEAP *
eap_method_peap_new (const char *glade_file,
WirelessSecurity *parent,
- NMConnection *connection,
- const char *connection_id)
+ NMConnection *connection)
{
EAPMethodPEAP *method;
GtkWidget *widget;
@@ -412,7 +408,7 @@
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), filename);
}
- widget = inner_auth_combo_init (method, glade_file, connection, connection_id);
+ widget = inner_auth_combo_init (method, glade_file, connection);
inner_auth_combo_changed_cb (widget, (gpointer) method);
widget = glade_xml_get_widget (xml, "eap_peap_version_combo");
Modified: trunk/src/wireless-security/eap-method-peap.h
==============================================================================
--- trunk/src/wireless-security/eap-method-peap.h (original)
+++ trunk/src/wireless-security/eap-method-peap.h Wed Aug 27 03:31:43 2008
@@ -35,8 +35,7 @@
EAPMethodPEAP * eap_method_peap_new (const char *glade_file,
WirelessSecurity *parent,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
#endif /* EAP_METHOD_PEAP_H */
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 Wed Aug 27 03:31:43 2008
@@ -128,7 +128,6 @@
eap_method_simple_new (const char *glade_file,
WirelessSecurity *parent,
NMConnection *connection,
- const char *connection_id,
EAPMethodSimpleType type)
{
EAPMethodSimple *method;
@@ -183,12 +182,12 @@
(GCallback) wireless_security_changed_cb,
parent);
/* Fill secrets, if any */
- if (connection && connection_id) {
+ if (connection) {
GHashTable *secrets;
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
NM_SETTING_802_1X_SETTING_NAME,
TRUE,
&error);
Modified: trunk/src/wireless-security/eap-method-simple.h
==============================================================================
--- trunk/src/wireless-security/eap-method-simple.h (original)
+++ trunk/src/wireless-security/eap-method-simple.h Wed Aug 27 03:31:43 2008
@@ -41,7 +41,6 @@
EAPMethodSimple * eap_method_simple_new (const char *glade_file,
WirelessSecurity *parent,
NMConnection *connection,
- const char *connection_id,
EAPMethodSimpleType type);
#endif /* EAP_METHOD_SIMPLE_H */
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 Wed Aug 27 03:31:43 2008
@@ -338,7 +338,6 @@
eap_method_tls_new (const char *glade_file,
WirelessSecurity *parent,
NMConnection *connection,
- const char *connection_id,
gboolean phase2)
{
EAPMethodTLS *method;
@@ -406,12 +405,12 @@
(GCallback) wireless_security_changed_cb,
parent);
/* Fill secrets, if any */
- if (connection && connection_id) {
+ if (connection) {
GHashTable *secrets;
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
NM_SETTING_802_1X_SETTING_NAME,
TRUE,
&error);
Modified: trunk/src/wireless-security/eap-method-tls.h
==============================================================================
--- trunk/src/wireless-security/eap-method-tls.h (original)
+++ trunk/src/wireless-security/eap-method-tls.h Wed Aug 27 03:31:43 2008
@@ -35,7 +35,6 @@
EAPMethodTLS * eap_method_tls_new (const char *glade_file,
WirelessSecurity *parent,
NMConnection *connection,
- const char *connection_id,
gboolean phase2);
#endif /* EAP_METHOD_TLS_H */
Modified: trunk/src/wireless-security/eap-method-ttls.c
==============================================================================
--- trunk/src/wireless-security/eap-method-ttls.c (original)
+++ trunk/src/wireless-security/eap-method-ttls.c Wed Aug 27 03:31:43 2008
@@ -277,7 +277,6 @@
inner_auth_combo_init (EAPMethodTTLS *method,
const char *glade_file,
NMConnection *connection,
- const char *connection_id,
NMSetting8021x *s_8021x)
{
GladeXML *xml = EAP_METHOD (method)->xml;
@@ -303,7 +302,6 @@
em_pap = eap_method_simple_new (glade_file,
method->sec_parent,
connection,
- connection_id,
EAP_METHOD_SIMPLE_TYPE_PAP);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
@@ -319,7 +317,6 @@
em_mschap = eap_method_simple_new (glade_file,
method->sec_parent,
connection,
- connection_id,
EAP_METHOD_SIMPLE_TYPE_MSCHAP);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
@@ -335,7 +332,6 @@
em_mschap_v2 = eap_method_simple_new (glade_file,
method->sec_parent,
connection,
- connection_id,
EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
@@ -351,7 +347,6 @@
em_chap = eap_method_simple_new (glade_file,
method->sec_parent,
connection,
- connection_id,
EAP_METHOD_SIMPLE_TYPE_CHAP);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
@@ -380,8 +375,7 @@
EAPMethodTTLS *
eap_method_ttls_new (const char *glade_file,
WirelessSecurity *parent,
- NMConnection *connection,
- const char *connection_id)
+ NMConnection *connection)
{
EAPMethodTTLS *method;
GtkWidget *widget;
@@ -458,7 +452,7 @@
(GCallback) wireless_security_changed_cb,
parent);
- widget = inner_auth_combo_init (method, glade_file, connection, connection_id, s_8021x);
+ widget = inner_auth_combo_init (method, glade_file, connection, s_8021x);
inner_auth_combo_changed_cb (widget, (gpointer) method);
return method;
Modified: trunk/src/wireless-security/eap-method-ttls.h
==============================================================================
--- trunk/src/wireless-security/eap-method-ttls.h (original)
+++ trunk/src/wireless-security/eap-method-ttls.h Wed Aug 27 03:31:43 2008
@@ -35,8 +35,7 @@
EAPMethodTTLS * eap_method_ttls_new (const char *glade_file,
WirelessSecurity *parent,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
#endif /* EAP_METHOD_TLS_H */
Modified: trunk/src/wireless-security/wireless-security.c
==============================================================================
--- trunk/src/wireless-security/wireless-security.c (original)
+++ trunk/src/wireless-security/wireless-security.c Wed Aug 27 03:31:43 2008
@@ -284,8 +284,7 @@
const char *glade_file,
const char *combo_name,
GCallback auth_combo_changed_cb,
- NMConnection *connection,
- const char *connection_id)
+ NMConnection *connection)
{
GtkWidget *combo;
GtkListStore *auth_model;
@@ -306,6 +305,7 @@
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
g_assert (s_con);
g_assert (s_con->type);
+ g_assert (s_con->uuid);
if (!strcmp (s_con->type, NM_SETTING_WIRED_SETTING_NAME))
wired = TRUE;
@@ -316,7 +316,7 @@
auth_model = gtk_list_store_new (2, G_TYPE_STRING, eap_method_get_g_type ());
- em_tls = eap_method_tls_new (glade_file, sec, connection, connection_id, FALSE);
+ em_tls = eap_method_tls_new (glade_file, sec, connection, FALSE);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
AUTH_NAME_COLUMN, _("TLS"),
@@ -328,7 +328,7 @@
item++;
if (!wired) {
- em_leap = eap_method_leap_new (glade_file, sec, connection, connection_id);
+ em_leap = eap_method_leap_new (glade_file, sec, connection);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
AUTH_NAME_COLUMN, _("LEAP"),
@@ -340,7 +340,7 @@
item++;
}
- em_ttls = eap_method_ttls_new (glade_file, sec, connection, connection_id);
+ em_ttls = eap_method_ttls_new (glade_file, sec, connection);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
AUTH_NAME_COLUMN, _("Tunneled TLS"),
@@ -351,7 +351,7 @@
active = item;
item++;
- em_peap = eap_method_peap_new (glade_file, sec, connection, connection_id);
+ em_peap = eap_method_peap_new (glade_file, sec, connection);
gtk_list_store_append (auth_model, &iter);
gtk_list_store_set (auth_model, &iter,
AUTH_NAME_COLUMN, _("Protected EAP (PEAP)"),
Modified: trunk/src/wireless-security/wireless-security.h
==============================================================================
--- trunk/src/wireless-security/wireless-security.h (original)
+++ trunk/src/wireless-security/wireless-security.h Wed Aug 27 03:31:43 2008
@@ -106,8 +106,7 @@
const char *glade_file,
const char *combo_name,
GCallback auth_combo_changed_cb,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
void ws_802_1x_auth_combo_changed (GtkWidget *combo,
WirelessSecurity *sec,
Modified: trunk/src/wireless-security/ws-dynamic-wep.c
==============================================================================
--- trunk/src/wireless-security/ws-dynamic-wep.c (original)
+++ trunk/src/wireless-security/ws-dynamic-wep.c Wed Aug 27 03:31:43 2008
@@ -98,8 +98,7 @@
WirelessSecurityDynamicWEP *
ws_dynamic_wep_new (const char *glade_file,
- NMConnection *connection,
- const char *connection_id)
+ NMConnection *connection)
{
WirelessSecurityDynamicWEP *sec;
GtkWidget *widget;
@@ -138,8 +137,7 @@
glade_file,
"dynamic_wep_auth_combo",
(GCallback) auth_combo_changed_cb,
- connection,
- connection_id);
+ connection);
auth_combo_changed_cb (widget, (gpointer) sec);
return sec;
Modified: trunk/src/wireless-security/ws-dynamic-wep.h
==============================================================================
--- trunk/src/wireless-security/ws-dynamic-wep.h (original)
+++ trunk/src/wireless-security/ws-dynamic-wep.h Wed Aug 27 03:31:43 2008
@@ -29,8 +29,7 @@
} WirelessSecurityDynamicWEP;
WirelessSecurityDynamicWEP * ws_dynamic_wep_new (const char *glade_file,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
#endif /* WS_DYNAMIC_WEP_H */
Modified: trunk/src/wireless-security/ws-leap.c
==============================================================================
--- trunk/src/wireless-security/ws-leap.c (original)
+++ trunk/src/wireless-security/ws-leap.c Wed Aug 27 03:31:43 2008
@@ -111,7 +111,7 @@
}
WirelessSecurityLEAP *
-ws_leap_new (const char *glade_file, NMConnection *connection, const char *connection_id)
+ws_leap_new (const char *glade_file, NMConnection *connection)
{
WirelessSecurityLEAP *sec;
GtkWidget *widget;
@@ -159,12 +159,12 @@
g_signal_connect (G_OBJECT (widget), "changed",
(GCallback) wireless_security_changed_cb,
sec);
- if (wsec && connection_id) {
+ if (wsec) {
GHashTable *secrets;
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
FALSE,
&error);
Modified: trunk/src/wireless-security/ws-leap.h
==============================================================================
--- trunk/src/wireless-security/ws-leap.h (original)
+++ trunk/src/wireless-security/ws-leap.h Wed Aug 27 03:31:43 2008
@@ -28,8 +28,7 @@
} WirelessSecurityLEAP;
WirelessSecurityLEAP * ws_leap_new (const char *glade_file,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
#endif /* WS_LEAP_H */
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 Wed Aug 27 03:31:43 2008
@@ -266,7 +266,6 @@
WirelessSecurityWEPKey *
ws_wep_key_new (const char *glade_file,
NMConnection *connection,
- const char *connection_id,
WEPKeyType type,
gboolean adhoc_create)
{
@@ -310,12 +309,12 @@
g_assert (widget);
/* Fill secrets, if any */
- if (connection && connection_id) {
+ if (connection) {
GHashTable *secrets;
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
FALSE,
&error);
@@ -395,6 +394,10 @@
widget = glade_xml_get_widget (xml, "auth_method_combo");
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), is_shared_key ? 1 : 0);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ sec);
+
/* Ad-Hoc connections can't use Shared Key auth */
if (is_adhoc) {
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
@@ -403,10 +406,6 @@
gtk_widget_hide (widget);
}
- g_signal_connect (G_OBJECT (widget), "changed",
- (GCallback) wireless_security_changed_cb,
- sec);
-
return sec;
}
@@ -451,7 +450,7 @@
}
WEPKeyType
-ws_wep_guess_key_type (NMConnection *connection, const char *connection_id)
+ws_wep_guess_key_type (NMConnection *connection)
{
GHashTable *secrets;
GError *error = NULL;
@@ -461,9 +460,7 @@
if (!connection)
return WEP_KEY_TYPE_KEY;
- g_return_val_if_fail (connection_id != NULL, WEP_KEY_TYPE_KEY);
-
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
FALSE,
&error);
Modified: trunk/src/wireless-security/ws-wep-key.h
==============================================================================
--- trunk/src/wireless-security/ws-wep-key.h (original)
+++ trunk/src/wireless-security/ws-wep-key.h Wed Aug 27 03:31:43 2008
@@ -37,11 +37,10 @@
WirelessSecurityWEPKey * ws_wep_key_new (const char *glade_file,
NMConnection *connection,
- const char *connection_id,
WEPKeyType type,
gboolean adhoc_create);
-WEPKeyType ws_wep_guess_key_type (NMConnection *connection, const char *connection_id);
+WEPKeyType ws_wep_guess_key_type (NMConnection *connection);
#endif /* WS_WEP_KEY_H */
Modified: trunk/src/wireless-security/ws-wpa-eap.c
==============================================================================
--- trunk/src/wireless-security/ws-wpa-eap.c (original)
+++ trunk/src/wireless-security/ws-wpa-eap.c Wed Aug 27 03:31:43 2008
@@ -94,8 +94,7 @@
WirelessSecurityWPAEAP *
ws_wpa_eap_new (const char *glade_file,
- NMConnection *connection,
- const char *connection_id)
+ NMConnection *connection)
{
WirelessSecurityWPAEAP *sec;
GtkWidget *widget;
@@ -134,8 +133,7 @@
glade_file,
"wpa_eap_auth_combo",
(GCallback) auth_combo_changed_cb,
- connection,
- connection_id);
+ connection);
auth_combo_changed_cb (widget, (gpointer) sec);
return sec;
Modified: trunk/src/wireless-security/ws-wpa-eap.h
==============================================================================
--- trunk/src/wireless-security/ws-wpa-eap.h (original)
+++ trunk/src/wireless-security/ws-wpa-eap.h Wed Aug 27 03:31:43 2008
@@ -29,8 +29,7 @@
} WirelessSecurityWPAEAP;
WirelessSecurityWPAEAP * ws_wpa_eap_new (const char *glade_file,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
#endif /* WS_WPA_EAP_H */
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 Wed Aug 27 03:31:43 2008
@@ -148,9 +148,7 @@
}
WirelessSecurityWPAPSK *
-ws_wpa_psk_new (const char *glade_file,
- NMConnection *connection,
- const char *connection_id)
+ws_wpa_psk_new (const char *glade_file, NMConnection *connection)
{
WirelessSecurityWPAPSK *sec;
GtkWidget *widget;
@@ -190,12 +188,12 @@
sec);
/* Fill secrets, if any */
- if (connection && connection_id) {
+ if (connection) {
GHashTable *secrets;
GError *error = NULL;
GValue *value;
- secrets = nm_gconf_get_keyring_items (connection, connection_id,
+ secrets = nm_gconf_get_keyring_items (connection,
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
FALSE,
&error);
Modified: trunk/src/wireless-security/ws-wpa-psk.h
==============================================================================
--- trunk/src/wireless-security/ws-wpa-psk.h (original)
+++ trunk/src/wireless-security/ws-wpa-psk.h Wed Aug 27 03:31:43 2008
@@ -28,8 +28,7 @@
} WirelessSecurityWPAPSK;
WirelessSecurityWPAPSK * ws_wpa_psk_new (const char *glade_file,
- NMConnection *connection,
- const char *connection_id);
+ NMConnection *connection);
#endif /* WS_WEP_KEY_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]