summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-08-11 15:25:21 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2016-10-31 18:43:09 +0100
commitfdd9bfc0eebe1a70d295ae517ae8247b003168da (patch)
treea34fa061d17f2f85b10ed03d83a4d3e6689a3e13
parent074d7309fac3c68d5f623609b429a7623c0a3867 (diff)
downloadnetwork-manager-applet-fdd9bfc0eebe1a70d295ae517ae8247b003168da.tar.gz
applet: fix handling of 802.1x secrets for ethernet connections
When @tmp_connection is destroyed it clears all its secrets: remove the 802.1x setting before unreferencing the connection since the setting is used by another connection. Fixes: 3722a190468f5ce5898db8838611bc826d3153f1 https://bugzilla.gnome.org/show_bug.cgi?id=769661 (cherry picked from commit 4eecd6409730b0e03b7cca0e21d2f7f35302965b)
-rw-r--r--src/ethernet-dialog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ethernet-dialog.c b/src/ethernet-dialog.c
index 6cbe4551..3efa8ba4 100644
--- a/src/ethernet-dialog.c
+++ b/src/ethernet-dialog.c
@@ -156,6 +156,10 @@ nma_ethernet_dialog_get_connection (GtkWidget *dialog)
/* Save new CA cert ignore values to GSettings */
eap_method_ca_cert_ignore_save (tmp_connection);
+ /* Remove the 8021x setting to prevent the clearing of secrets when the
+ * simple-connection is destroyed.
+ */
+ nm_connection_remove_setting (tmp_connection, NM_TYPE_SETTING_802_1X);
g_object_unref (tmp_connection);
return connection;