Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
NetworkManager-gnome
nma-wired-certs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nma-wired-certs.patch of Package NetworkManager-gnome
commit d18e6493b55a697d0965c5b5054f39c89f2646a3 Author: dcbw <dcbw@9c6bbc85-7128-0410-879a-9bbc9e4270e9> Date: Fri Dec 5 18:17:07 2008 +0000 nm-bnc-460390. 2008-12-05 Dan Williams <dcbw@redhat.com> * src/gconf-helpers/gconf-helpers.c src/gconf-helpers/gconf-helpers.h - (nm_gconf_clear_private_connection_values): new function to clear applet private values from a connection * src/connection-editor/page-wired-security.c - (ce_page_wired_security_new): ensure setting gets updated when security is changed - (validate): copy applet private values to the real connection when using 802.1x security; clear applet private values when there's no security * src/connection-editor/page-wireless-security.c - (validate): clear applet private values when there's no security git-svn-id: svn+ssh://svn.gnome.org/svn/network-manager-applet/trunk@1054 9c6bbc85-7128-0410-879a-9bbc9e4270e9 diff --git a/ChangeLog b/ChangeLog index 324ea8b..b9ee3d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2008-12-05 Dan Williams <dcbw@redhat.com> + + * src/gconf-helpers/gconf-helpers.c + src/gconf-helpers/gconf-helpers.h + - (nm_gconf_clear_private_connection_values): new function to clear + applet private values from a connection + + * src/connection-editor/page-wired-security.c + - (ce_page_wired_security_new): ensure setting gets updated when + security is changed + - (validate): copy applet private values to the real connection when + using 802.1x security; clear applet private values when there's no + security + + * src/connection-editor/page-wireless-security.c + - (validate): clear applet private values when there's no security + 2008-11-26 Dan Williams <dcbw@redhat.com> * Release 0.7 diff --git a/src/connection-editor/page-wired-security.c b/src/connection-editor/page-wired-security.c index 9986752..6c1c74a 100644 --- a/src/connection-editor/page-wired-security.c +++ b/src/connection-editor/page-wired-security.c @@ -93,6 +93,7 @@ ce_page_wired_security_new (NMConnection *connection) G_CALLBACK (enable_toggled), self); gtk_toggle_button_set_active (priv->enabled, setting != NULL); + g_signal_connect_swapped (priv->enabled, "toggled", G_CALLBACK (ce_page_changed), self); gtk_widget_set_sensitive (priv->security_widget, setting != NULL); gtk_box_pack_start (GTK_BOX (parent->page), GTK_WIDGET (priv->enabled), FALSE, TRUE, 12); @@ -123,13 +124,15 @@ validate (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))); + nm_gconf_copy_private_connection_values (connection, tmp_connection); g_object_unref (tmp_connection); } else g_set_error (error, 0, 0, "Invalid 802.1x security"); } else { - valid = TRUE; nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X); + nm_gconf_clear_private_connection_values (connection); + valid = TRUE; } return valid; diff --git a/src/connection-editor/page-wireless-security.c b/src/connection-editor/page-wireless-security.c index dd629db..e5e7a7c 100644 --- a/src/connection-editor/page-wireless-security.c +++ b/src/connection-editor/page-wireless-security.c @@ -29,6 +29,7 @@ #include <nm-setting-connection.h> #include <nm-setting-wireless.h> #include <nm-setting-wireless-security.h> +#include <nm-setting-8021x.h> #include <nm-utils.h> #include "wireless-security.h" @@ -407,6 +408,9 @@ validate (CEPage *page, NMConnection *connection, GError **error) } else { /* No security, unencrypted */ g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NULL, NULL); + nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY); + nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X); + nm_gconf_clear_private_connection_values (connection); valid = TRUE; } diff --git a/src/gconf-helpers/gconf-helpers.c b/src/gconf-helpers/gconf-helpers.c index cdc8971..75df9da 100644 --- a/src/gconf-helpers/gconf-helpers.c +++ b/src/gconf-helpers/gconf-helpers.c @@ -1830,6 +1830,24 @@ nm_gconf_copy_private_connection_values (NMConnection *dst, NMConnection *src) copy_str_item (dst, src, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG); } +void +nm_gconf_clear_private_connection_values (NMConnection *connection) +{ + g_return_if_fail (NM_IS_CONNECTION (connection)); + + g_object_set_data (G_OBJECT (connection), NMA_CA_CERT_IGNORE_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PHASE2_CA_CERT_IGNORE_TAG, NULL); + + g_object_set_data (G_OBJECT (connection), NMA_PATH_CLIENT_CERT_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PATH_PHASE2_CLIENT_CERT_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PATH_CA_CERT_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PATH_PHASE2_CA_CERT_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PATH_PRIVATE_KEY_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PRIVATE_KEY_PASSWORD_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PATH_PHASE2_PRIVATE_KEY_TAG, NULL); + g_object_set_data (G_OBJECT (connection), NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG, NULL); +} + NMConnection * nm_gconf_connection_duplicate (NMConnection *connection) { diff --git a/src/gconf-helpers/gconf-helpers.h b/src/gconf-helpers/gconf-helpers.h index 06be8fb..df814f6 100644 --- a/src/gconf-helpers/gconf-helpers.h +++ b/src/gconf-helpers/gconf-helpers.h @@ -48,6 +48,7 @@ NMConnection *nm_gconf_connection_duplicate (NMConnection *connection); void nm_gconf_copy_private_connection_values (NMConnection *dst, NMConnection *src); +void nm_gconf_clear_private_connection_values (NMConnection *connection); #define KEYRING_UUID_TAG "connection-uuid" #define KEYRING_SN_TAG "setting-name"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor