[network-manager-applet/nma-1-2] connection-editor: Fix handling of wired 802-1x security setting



commit 5209fb4373a12be797bb37e9ddff6cedfdb33e58
Author: Mikhail Efremov <sem altlinux org>
Date:   Thu Aug 25 20:46:01 2016 +0300

    connection-editor: Fix handling of wired 802-1x security setting
    
    Function nm_setting_duplicate() can't copy object's data.
    As a result a value of the "Ignore CA certificate" checkbox was
    always lost. So don't copy settings, just use g_object_ref() again
    and remove the 8021x setting from the temporary object to prevent
    the clearing of secrets.
    
    https://mail.gnome.org/archives/networkmanager-list/2016-August/msg00109.html
    
    Fixes: c21d56dd22057103c8125a49307b4ff47b5b644d
    (cherry picked from commit 2c844acc8f00d9c1d3536b114208170c9cdbe7f2)

 src/connection-editor/page-8021x-security.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/connection-editor/page-8021x-security.c b/src/connection-editor/page-8021x-security.c
index 5af6111..28f87f9 100644
--- a/src/connection-editor/page-8021x-security.c
+++ b/src/connection-editor/page-8021x-security.c
@@ -161,6 +161,10 @@ ce_page_validate_v (CEPage *page, NMConnection *connection, GError **error)
                        s_8021x = nm_connection_get_setting (tmp_connection, NM_TYPE_SETTING_802_1X);
                        nm_connection_add_setting (connection, NM_SETTING (g_object_ref (s_8021x)));
 
+                       /* 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);
                }
        } else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]