Index: network-manager-applet-0.9.4.1/src/applet-device-wifi.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/applet-device-wifi.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/applet-device-wifi.c	2013-01-16 11:42:37.752055378 +0100
@@ -405,6 +405,7 @@ _do_new_auto_connection (NMApplet *apple
 	NMSettingWirelessSecurity *s_wsec = NULL;
 	NMSetting8021x *s_8021x = NULL;
 	const GByteArray *ssid;
+	NM80211ApFlags flags;
 	NM80211ApSecurityFlags wpa_flags, rsn_flags;
 	GtkWidget *dialog;
 	MoreInfo *more_info;
@@ -431,6 +432,7 @@ _do_new_auto_connection (NMApplet *apple
 	/* If the AP is WPA[2]-Enterprise then we need to set up a minimal 802.1x
 	 * setting and ask the user for more information.
 	 */
+	flags = nm_access_point_get_flags (ap);
 	rsn_flags = nm_access_point_get_rsn_flags (ap);
 	wpa_flags = nm_access_point_get_wpa_flags (ap);
 	if (   (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)
@@ -462,6 +464,29 @@ _do_new_auto_connection (NMApplet *apple
 		nm_connection_add_setting (connection, NM_SETTING (s_8021x));
 	}
 
+	if (utils_default_to_private_connection (applet->nm_client)) {
+		if (!s_con) {
+			s_con = (NMSettingConnection *) nm_setting_connection_new ();
+			nm_connection_add_setting (connection, NM_SETTING (s_con));
+		}
+		nm_setting_connection_add_permission (s_con, "user", g_get_user_name (), NULL);
+
+		if ((rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK) ||
+		    (wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK)) {
+			if (!s_wsec) {
+				s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+				nm_connection_add_setting (connection, NM_SETTING (s_wsec));
+			}
+			g_object_set (s_wsec, NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED, NULL);
+		} else if (flags & NM_802_11_AP_FLAGS_PRIVACY) {
+			if (!s_wsec) {
+				s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+				nm_connection_add_setting (connection, NM_SETTING (s_wsec));
+			}
+			g_object_set (s_wsec, NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED, NULL);
+		}
+	}
+
 	/* If it's an 802.1x connection, we need more information, so pop up the
 	 * Dialog Of Doom.
 	 */
Index: network-manager-applet-0.9.4.1/src/applet-device-gsm.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/applet-device-gsm.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/applet-device-gsm.c	2013-01-16 11:42:37.752055378 +0100
@@ -147,6 +147,7 @@ mobile_wizard_done (NMAMobileWizard *wiz
 		              NM_SETTING_GSM_NUMBER, "*99#",
 		              NM_SETTING_GSM_USERNAME, method->username,
 		              NM_SETTING_GSM_PASSWORD, method->password,
+		              NM_SETTING_GSM_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED,
 		              NM_SETTING_GSM_APN, method->gsm_apn,
 		              NULL);
 		nm_connection_add_setting (connection, setting);
@@ -177,6 +178,7 @@ mobile_wizard_done (NMAMobileWizard *wiz
 		              NULL);
 		g_free (uuid);
 		g_free (id);
+		nm_setting_connection_add_permission ((NMSettingConnection *) setting, "user", g_get_user_name (), NULL);
 		nm_connection_add_setting (connection, setting);
 	}
 
Index: network-manager-applet-0.9.4.1/src/libnm-gtk/nm-wireless-dialog.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/libnm-gtk/nm-wireless-dialog.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/libnm-gtk/nm-wireless-dialog.c	2013-01-16 11:42:37.752055378 +0100
@@ -1219,6 +1219,9 @@ nma_wireless_dialog_get_connection (NMAW
 			      NM_SETTING_CONNECTION_UUID, uuid,
 			      NULL);
 		g_free (uuid);
+		if (utils_default_to_private_connection (priv->client)) {
+			nm_setting_connection_add_permission (s_con, "user", g_get_user_name (), NULL);
+		}
 		nm_connection_add_setting (connection, (NMSetting *) s_con);
 
 		s_wireless = (NMSettingWireless *) nm_setting_wireless_new ();
Index: network-manager-applet-0.9.4.1/src/applet-device-cdma.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/applet-device-cdma.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/applet-device-cdma.c	2013-01-16 11:42:37.752055378 +0100
@@ -119,6 +119,7 @@ mobile_wizard_done (NMAMobileWizard *wiz
 		              NM_SETTING_CDMA_NUMBER, "#777",
 		              NM_SETTING_CDMA_USERNAME, method->username,
 		              NM_SETTING_CDMA_PASSWORD, method->password,
+		              NM_SETTING_CDMA_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED,
 		              NULL);
 		nm_connection_add_setting (connection, setting);
 
@@ -148,6 +149,7 @@ mobile_wizard_done (NMAMobileWizard *wiz
 		              NULL);
 		g_free (uuid);
 		g_free (id);
+		nm_setting_connection_add_permission ((NMSettingConnection *) setting, "user", g_get_user_name (), NULL);
 		nm_connection_add_setting (connection, setting);
 	}
 
Index: network-manager-applet-0.9.4.1/src/gnome-bluetooth/bt-widget.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/gnome-bluetooth/bt-widget.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/gnome-bluetooth/bt-widget.c	2013-01-16 11:42:37.756055413 +0100
@@ -256,6 +256,7 @@ add_pan_connection (PluginInfo *info)
 	              NULL);
 	g_free (id);
 	g_free (uuid);
+	nm_setting_connection_add_permission ((NMSettingConnection *) setting, "user", g_get_user_name (), NULL);
 	nm_connection_add_setting (connection, setting);
 
 	/* The Bluetooth settings */
@@ -392,6 +393,7 @@ dun_new_cdma (NMAMobileWizardAccessMetho
 	              NM_SETTING_CDMA_NUMBER, "#777",
 	              NM_SETTING_CDMA_USERNAME, method->username,
 	              NM_SETTING_CDMA_PASSWORD, method->password,
+	              NM_SETTING_CDMA_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED,
 	              NULL);
 	nm_connection_add_setting (connection, setting);
 
@@ -421,6 +423,7 @@ dun_new_cdma (NMAMobileWizardAccessMetho
 	              NULL);
 	g_free (uuid);
 	g_free (id);
+	nm_setting_connection_add_permission ((NMSettingConnection *) setting, "user", g_get_user_name (), NULL);
 	nm_connection_add_setting (connection, setting);
 
 	return connection;
@@ -440,6 +443,7 @@ dun_new_gsm (NMAMobileWizardAccessMethod
 	              NM_SETTING_GSM_NUMBER, "*99#",
 	              NM_SETTING_GSM_USERNAME, method->username,
 	              NM_SETTING_GSM_PASSWORD, method->password,
+	              NM_SETTING_GSM_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED,
 	              NM_SETTING_GSM_APN, method->gsm_apn,
 	              NULL);
 	nm_connection_add_setting (connection, setting);
@@ -470,6 +474,7 @@ dun_new_gsm (NMAMobileWizardAccessMethod
 	              NULL);
 	g_free (uuid);
 	g_free (id);
+	nm_setting_connection_add_permission ((NMSettingConnection *) setting, "user", g_get_user_name (), NULL);
 	nm_connection_add_setting (connection, setting);
 
 	return connection;
Index: network-manager-applet-0.9.4.1/src/utils/utils.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/utils/utils.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/utils/utils.c	2013-01-16 11:42:37.756055413 +0100
@@ -390,3 +390,10 @@ utils_show_error_dialog (const char *tit
 	}
 }
 
+gboolean
+utils_default_to_private_connection (NMClient *client)
+{
+	NMClientPermissionResult perms;
+	perms = nm_client_get_permission_result (client, NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM);
+	return (perms != NM_CLIENT_PERMISSION_RESULT_YES);
+}
Index: network-manager-applet-0.9.4.1/src/utils/utils.h
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/utils/utils.h	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/utils/utils.h	2013-01-16 11:42:37.756055413 +0100
@@ -27,6 +27,7 @@
 #include <gtk/gtk.h>
 #include <nm-connection.h>
 #include <nm-device.h>
+#include <nm-client.h>
 #include <net/ethernet.h>
 #include <nm-access-point.h>
 #include <gnome-keyring.h>
@@ -64,6 +65,8 @@ void utils_show_error_dialog (const char
                               gboolean modal,
                               GtkWindow *parent);
 
+gboolean utils_default_to_private_connection (NMClient *client);
+
 #define NMA_ERROR (g_quark_from_static_string ("nma-error-quark"))
 
 typedef enum  {
Index: network-manager-applet-0.9.4.1/src/connection-editor/nm-connection-list.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/nm-connection-list.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/nm-connection-list.c	2013-01-16 11:42:37.756055413 +0100
@@ -605,6 +605,7 @@ add_clicked (GtkButton *button, gpointer
 	info->new_func (GTK_WINDOW (list->dialog),
 	                really_add_connection,
 	                page_get_connections,
+	                info->list->nm_client,
 	                info);
 }
 
@@ -1577,6 +1578,7 @@ nm_connection_list_create (NMConnectionL
 		info->new_func (GTK_WINDOW (info->list->dialog),
 		                really_add_connection,
 		                page_get_connections,
+		                info->list->nm_client,
 		                info);
 	}
 }
Index: network-manager-applet-0.9.4.1/src/wireless-security/ws-wpa-psk.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/wireless-security/ws-wpa-psk.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/wireless-security/ws-wpa-psk.c	2013-01-16 11:42:37.756055413 +0100
@@ -92,11 +92,13 @@ fill_connection (WirelessSecurity *paren
 {
 	GtkWidget *widget;
 	const char *key;
+	NMSettingConnection *s_con;
 	NMSettingWireless *s_wireless;
 	NMSettingWirelessSecurity *s_wireless_sec;
 	const char *mode;
 	gboolean is_adhoc = FALSE;
 
+	s_con = nm_connection_get_setting_connection (connection);
 	s_wireless = nm_connection_get_setting_wireless (connection);
 	g_assert (s_wireless);
 
@@ -113,6 +115,9 @@ fill_connection (WirelessSecurity *paren
 	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wpa_psk_entry"));
 	key = gtk_entry_get_text (GTK_ENTRY (widget));
 	g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_PSK, key, NULL);
+	/* If the connection is user-owned, mark the secrets as agent-owned */
+	if (s_con && nm_setting_connection_get_num_permissions (s_con))
+		g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED, NULL);
 
 	wireless_security_clear_ciphers (connection);
 	if (is_adhoc) {
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-mobile.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-mobile.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-mobile.c	2013-01-16 11:42:37.760055448 +0100
@@ -554,6 +554,7 @@ new_connection_mobile_wizard_done (NMAMo
 	NMConnection *connection = NULL;
 
 	if (!canceled && method) {
+		NMSettingConnection *s_con;
 		NMSetting *type_setting;
 		const char *ctype = NULL;
 		char *detail = NULL;
@@ -567,6 +568,7 @@ new_connection_mobile_wizard_done (NMAMo
 			              NM_SETTING_GSM_NUMBER, "*99#",
 			              NM_SETTING_GSM_USERNAME, method->username,
 			              NM_SETTING_GSM_PASSWORD, method->password,
+			              NM_SETTING_GSM_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED,
 			              NM_SETTING_GSM_APN, method->gsm_apn,
 			              NULL);
 			break;
@@ -578,6 +580,7 @@ new_connection_mobile_wizard_done (NMAMo
 			              NM_SETTING_CDMA_NUMBER, "#777",
 			              NM_SETTING_GSM_USERNAME, method->username,
 			              NM_SETTING_GSM_PASSWORD, method->password,
+			              NM_SETTING_GSM_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED,
 			              NULL);
 			break;
 		default:
@@ -592,6 +595,13 @@ new_connection_mobile_wizard_done (NMAMo
 		connection = ce_page_new_connection (detail, ctype, FALSE, info->get_connections_func, info->user_data);
 		g_free (detail);
 
+		s_con = nm_connection_get_setting_connection (connection);
+		if (!s_con) {
+			s_con = (NMSettingConnection *) nm_setting_connection_new ();
+			nm_connection_add_setting (connection, NM_SETTING (s_con));
+		}
+		nm_setting_connection_add_permission (s_con, "user", g_get_user_name (), NULL);
+
 		nm_connection_add_setting (connection, type_setting);
 		add_default_serial_setting (connection);
 		nm_connection_add_setting (connection, nm_setting_ppp_new ());
@@ -614,6 +624,7 @@ void
 mobile_connection_new (GtkWindow *parent,
                        PageNewConnectionResultFunc result_func,
                        PageGetConnectionsFunc get_connections_func,
+                       NMClient *client,
                        gpointer user_data)
 {
 	NMAMobileWizard *wizard;
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-vpn.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-vpn.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-vpn.c	2013-01-16 11:42:37.760055448 +0100
@@ -186,10 +186,12 @@ void
 vpn_connection_new (GtkWindow *parent,
                     PageNewConnectionResultFunc result_func,
                     PageGetConnectionsFunc get_connections_func,
+                    NMClient *client,
                     gpointer user_data)
 {
 	char *service = NULL;
 	NMConnection *connection;
+	NMSettingConnection *s_con;
 	NMSetting *s_vpn;
 
 	service = vpn_ask_connection_type (parent);
@@ -203,6 +205,14 @@ vpn_connection_new (GtkWindow *parent,
 	                                     FALSE,
 	                                     get_connections_func,
 	                                     user_data);
+
+	s_con = nm_connection_get_setting_connection (connection);
+	if (!s_con) {
+		s_con = (NMSettingConnection *) nm_setting_connection_new ();
+		nm_connection_add_setting (connection, NM_SETTING (s_con));
+	}
+	nm_setting_connection_add_permission (s_con, "user", g_get_user_name (), NULL);
+
 	s_vpn = nm_setting_vpn_new ();
 	g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, service, NULL);
 	g_free (service);
Index: network-manager-applet-0.9.4.1/src/connection-editor/ce-page.h
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/ce-page.h	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/ce-page.h	2013-01-16 11:42:37.760055448 +0100
@@ -43,6 +43,7 @@ typedef GSList * (*PageGetConnectionsFun
 typedef void (*PageNewConnectionFunc) (GtkWindow *parent,
                                        PageNewConnectionResultFunc result_func,
                                        PageGetConnectionsFunc get_connections_func,
+                                       NMClient *client,
                                        gpointer user_data);
 
 #define CE_TYPE_PAGE            (ce_page_get_type ())
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-dsl.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-dsl.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-dsl.c	2013-01-16 11:42:37.760055448 +0100
@@ -224,6 +224,7 @@ void
 dsl_connection_new (GtkWindow *parent,
                     PageNewConnectionResultFunc result_func,
                     PageGetConnectionsFunc get_connections_func,
+                    NMClient *client,
                     gpointer user_data)
 {
 	NMConnection *connection;
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-dsl.h
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-dsl.h	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-dsl.h	2013-01-16 11:42:37.760055448 +0100
@@ -56,6 +56,7 @@ CEPage *ce_page_dsl_new (NMConnection *c
 void dsl_connection_new (GtkWindow *parent,
                          PageNewConnectionResultFunc callback,
                          PageGetConnectionsFunc get_connections_func,
+                         NMClient *client,
                          gpointer user_data);
 
 #endif  /* __PAGE_DSL_H__ */
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-mobile.h
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-mobile.h	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-mobile.h	2013-01-16 11:42:37.760055448 +0100
@@ -56,6 +56,7 @@ CEPage *ce_page_mobile_new (NMConnection
 void mobile_connection_new (GtkWindow *parent,
                             PageNewConnectionResultFunc result_func,
                             PageGetConnectionsFunc get_connections_func,
+                            NMClient *client,
                             gpointer user_data);
 
 #endif  /* __PAGE_MOBILE_H__ */
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-vpn.h
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-vpn.h	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-vpn.h	2013-01-16 11:42:37.760055448 +0100
@@ -56,6 +56,7 @@ CEPage *ce_page_vpn_new (NMConnection *c
 void vpn_connection_new (GtkWindow *parent,
                          PageNewConnectionResultFunc result_func,
                          PageGetConnectionsFunc get_connections_func,
+                         NMClient *client,
                          gpointer user_data);
 
 #endif  /* __PAGE_VPN_H__ */
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-wired.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-wired.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-wired.c	2013-01-16 11:42:37.760055448 +0100
@@ -442,6 +442,7 @@ void
 wired_connection_new (GtkWindow *parent,
                       PageNewConnectionResultFunc result_func,
                       PageGetConnectionsFunc get_connections_func,
+                      NMClient *client,
                       gpointer user_data)
 {
 	NMConnection *connection;
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-wired.h
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-wired.h	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-wired.h	2013-01-16 11:42:37.760055448 +0100
@@ -56,6 +56,7 @@ CEPage *ce_page_wired_new (NMConnection
 void wired_connection_new (GtkWindow *parent,
                            PageNewConnectionResultFunc result_func,
                            PageGetConnectionsFunc get_connections_func,
+                           NMClient *client,
                            gpointer user_data);
 
 #endif  /* __PAGE_WIRED_H__ */
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-wireless.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-wireless.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-wireless.c	2013-01-16 11:42:37.760055448 +0100
@@ -33,6 +33,8 @@
 #include <nm-device-wifi.h>
 #include <nm-utils.h>
 
+#include "utils.h"
+
 #include "page-wireless.h"
 
 G_DEFINE_TYPE (CEPageWireless, ce_page_wireless, CE_TYPE_PAGE)
@@ -655,6 +657,7 @@ void
 wifi_connection_new (GtkWindow *parent,
                      PageNewConnectionResultFunc result_func,
                      PageGetConnectionsFunc get_connections_func,
+                     NMClient *client,
                      gpointer user_data)
 {
 	NMConnection *connection;
@@ -665,6 +668,17 @@ wifi_connection_new (GtkWindow *parent,
 	                                     TRUE,
 	                                     get_connections_func,
 	                                     user_data);
+
+	if (utils_default_to_private_connection (client)) {
+		NMSettingConnection *s_con;
+		s_con = nm_connection_get_setting_connection (connection);
+		if (!s_con) {
+			s_con = (NMSettingConnection *) nm_setting_connection_new ();
+			nm_connection_add_setting (connection, NM_SETTING (s_con));
+		}
+		nm_setting_connection_add_permission (s_con, "user", g_get_user_name (), NULL);
+	}
+
 	s_wifi = nm_setting_wireless_new ();
 	g_object_set (s_wifi, NM_SETTING_WIRELESS_MODE, "infrastructure", NULL);
 	nm_connection_add_setting (connection, s_wifi);
Index: network-manager-applet-0.9.4.1/src/connection-editor/page-wireless.h
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/connection-editor/page-wireless.h	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/connection-editor/page-wireless.h	2013-01-16 11:42:37.760055448 +0100
@@ -60,6 +60,7 @@ GByteArray *ce_page_wireless_get_ssid (C
 void wifi_connection_new (GtkWindow *parent,
                           PageNewConnectionResultFunc result_func,
                           PageGetConnectionsFunc get_connections_func,
+                          NMClient *client,
                           gpointer user_data);
 
 #endif  /* __PAGE_WIRELESS_H__ */
Index: network-manager-applet-0.9.4.1/src/wireless-security/ws-wep-key.c
===================================================================
--- network-manager-applet-0.9.4.1.orig/src/wireless-security/ws-wep-key.c	2013-01-16 11:42:37.768055517 +0100
+++ network-manager-applet-0.9.4.1/src/wireless-security/ws-wep-key.c	2013-01-16 11:42:37.764055482 +0100
@@ -142,6 +142,7 @@ static void
 fill_connection (WirelessSecurity *parent, NMConnection *connection)
 {
 	WirelessSecurityWEPKey *sec = (WirelessSecurityWEPKey *) parent;
+	NMSettingConnection *s_con;
 	NMSettingWireless *s_wireless;
 	NMSettingWirelessSecurity *s_wsec;
 	GtkWidget *widget;
@@ -156,6 +157,8 @@ fill_connection (WirelessSecurity *paren
 	key = gtk_entry_get_text (GTK_ENTRY (widget));
 	strcpy (sec->keys[sec->cur_index], key);
 
+	s_con = nm_connection_get_setting_connection (connection);
+
 	s_wireless = nm_connection_get_setting_wireless (connection);
 	g_assert (s_wireless);
 
@@ -172,6 +175,10 @@ fill_connection (WirelessSecurity *paren
 	              NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, sec->type,
 	              NULL);
 
+	 /* If the connection is user-owned, mark the secrets as agent-owned */
+	if (s_con && nm_setting_connection_get_num_permissions)
+		g_object_set (s_wsec, NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED, NULL);
+
 	for (i = 0; i < 4; i++) {
 		if (strlen (sec->keys[i]))
 			nm_setting_wireless_security_set_wep_key (s_wsec, i, sec->keys[i]);
