summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-08-11 15:25:21 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2016-08-18 17:41:37 +0200
commit4eecd6409730b0e03b7cca0e21d2f7f35302965b (patch)
tree7953d5063bd6e04a3f0d75326080924dd37aed74
parent6891e7d311f1203888fdab3ceaf54f92f663de6a (diff)
downloadnetwork-manager-applet-4eecd6409730b0e03b7cca0e21d2f7f35302965b.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
-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 e5aaa846..c50ffb6f 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;