diff -Nru network-manager-applet-0.9.8.8/debian/changelog network-manager-applet-0.9.8.8/debian/changelog --- network-manager-applet-0.9.8.8/debian/changelog 2014-03-12 03:11:14.000000000 +0000 +++ network-manager-applet-0.9.8.8/debian/changelog 2014-03-18 18:48:23.000000000 +0000 @@ -1,3 +1,11 @@ +network-manager-applet (0.9.8.8-0ubuntu3) trusty; urgency=medium + + * debian/patches/11-user-connections.patch: Allow users with access to modify + their own connection to create wireless connections without using + system-wide privileges. (LP: #1116317) + + -- Mathieu Trudel-Lapierre Tue, 18 Mar 2014 14:48:18 -0400 + network-manager-applet (0.9.8.8-0ubuntu2) trusty; urgency=medium * debian/patches/set_atk_relations.patch: Set label relationships in info diff -Nru network-manager-applet-0.9.8.8/debian/patches/11-user-connections.patch network-manager-applet-0.9.8.8/debian/patches/11-user-connections.patch --- network-manager-applet-0.9.8.8/debian/patches/11-user-connections.patch 1970-01-01 00:00:00.000000000 +0000 +++ network-manager-applet-0.9.8.8/debian/patches/11-user-connections.patch 2014-03-18 18:48:23.000000000 +0000 @@ -0,0 +1,601 @@ +From: Josselin Mouette +Subject: Set passwords as agent-owned when they need to, to allow users + without modify.system permissions to easily configure their connections. +Last-Update: 2014-03-18 + +Index: network-manager-applet/src/applet-device-wifi.c +=================================================================== +--- network-manager-applet.orig/src/applet-device-wifi.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/applet-device-wifi.c 2013-09-13 20:06:35.784659889 +0200 +@@ -404,6 +404,7 @@ + NMSettingWirelessSecurity *s_wsec = NULL; + NMSetting8021x *s_8021x = NULL; + const GByteArray *ssid; ++ NM80211ApFlags flags; + NM80211ApSecurityFlags wpa_flags, rsn_flags; + GtkWidget *dialog; + MoreInfo *more_info; +@@ -430,6 +431,7 @@ + /* 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) +@@ -461,6 +463,29 @@ + 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/src/connection-editor/ce-page.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/ce-page.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/ce-page.h 2013-09-13 20:06:35.788659938 +0200 +@@ -48,6 +48,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #define CE_TYPE_PAGE (ce_page_get_type ()) +Index: network-manager-applet/src/connection-editor/new-connection.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/new-connection.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/new-connection.c 2013-09-13 20:06:35.788659938 +0200 +@@ -394,6 +394,7 @@ + gpointer user_data) + { + NewConnectionData *ncd; ++ NMConnectionList *list = user_data; + + ncd = g_slice_new (NewConnectionData); + ncd->parent_window = parent_window; +@@ -405,6 +406,7 @@ + detail, + settings, + new_connection_result, ++ list->nm_client, + ncd); + } + +Index: network-manager-applet/src/connection-editor/page-bond.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-bond.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-bond.c 2013-09-13 20:06:35.788659938 +0200 +@@ -571,6 +571,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +Index: network-manager-applet/src/connection-editor/page-bond.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-bond.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-bond.h 2013-09-13 20:06:35.788659938 +0200 +@@ -56,6 +56,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_BOND_H__ */ +Index: network-manager-applet/src/connection-editor/page-bridge.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-bridge.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-bridge.c 2013-09-13 20:06:35.788659938 +0200 +@@ -297,6 +297,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +Index: network-manager-applet/src/connection-editor/page-bridge.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-bridge.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-bridge.h 2013-09-13 20:06:35.788659938 +0200 +@@ -56,6 +56,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_BRIDGE_H__ */ +Index: network-manager-applet/src/connection-editor/page-dsl.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-dsl.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-dsl.c 2013-09-13 20:06:35.788659938 +0200 +@@ -227,6 +227,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +Index: network-manager-applet/src/connection-editor/page-dsl.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-dsl.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-dsl.h 2013-09-13 20:06:35.788659938 +0200 +@@ -58,6 +58,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc callback, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_DSL_H__ */ +Index: network-manager-applet/src/connection-editor/page-ethernet.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-ethernet.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-ethernet.c 2013-09-13 20:06:35.788659938 +0200 +@@ -389,6 +389,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +Index: network-manager-applet/src/connection-editor/page-ethernet.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-ethernet.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-ethernet.h 2013-09-13 20:06:35.788659938 +0200 +@@ -58,6 +58,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_ETHERNET_H__ */ +Index: network-manager-applet/src/connection-editor/page-infiniband.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-infiniband.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-infiniband.c 2013-09-13 20:06:35.792659987 +0200 +@@ -256,6 +256,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +Index: network-manager-applet/src/connection-editor/page-infiniband.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-infiniband.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-infiniband.h 2013-09-13 20:06:35.792659987 +0200 +@@ -56,6 +56,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_INFINIBAND_H__ */ +Index: network-manager-applet/src/connection-editor/page-mobile.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-mobile.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-mobile.c 2013-09-13 20:06:35.792659987 +0200 +@@ -570,6 +570,7 @@ + NMConnection *connection = NULL; + + if (!canceled && method) { ++ NMSettingConnection *s_con; + NMSetting *type_setting; + const char *ctype = NULL; + char *detail = NULL; +@@ -583,6 +584,7 @@ + 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; +@@ -594,6 +596,7 @@ + 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: +@@ -608,6 +611,13 @@ + connection = ce_page_new_connection (detail, ctype, FALSE, info->settings, 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 ()); +@@ -633,6 +643,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMAMobileWizard *wizard; +Index: network-manager-applet/src/connection-editor/page-mobile.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-mobile.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-mobile.h 2013-09-13 20:06:35.792659987 +0200 +@@ -58,6 +58,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_MOBILE_H__ */ +Index: network-manager-applet/src/connection-editor/page-vlan.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-vlan.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-vlan.c 2013-09-13 20:06:35.792659987 +0200 +@@ -675,6 +675,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +Index: network-manager-applet/src/connection-editor/page-vlan.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-vlan.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-vlan.h 2013-09-13 20:06:35.792659987 +0200 +@@ -56,6 +56,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_VLAN_H__ */ +Index: network-manager-applet/src/connection-editor/page-vpn.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-vpn.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-vpn.c 2013-09-13 20:06:35.792659987 +0200 +@@ -295,9 +295,11 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; ++ NMSettingConnection *s_con; + NMSetting *s_vpn; + + if (!detail) { +@@ -323,6 +325,14 @@ + FALSE, + settings, + 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, detail, NULL); + nm_connection_add_setting (connection, s_vpn); +Index: network-manager-applet/src/connection-editor/page-vpn.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-vpn.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-vpn.h 2013-09-13 20:06:35.792659987 +0200 +@@ -60,6 +60,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + void vpn_connection_import (GtkWindow *parent, +Index: network-manager-applet/src/connection-editor/page-wifi.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-wifi.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-wifi.c 2013-09-13 20:06:35.792659987 +0200 +@@ -33,6 +33,8 @@ + #include + #include + ++#include "utils.h" ++ + #include "page-wifi.h" + + G_DEFINE_TYPE (CEPageWifi, ce_page_wifi, CE_TYPE_PAGE) +@@ -655,6 +657,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +@@ -665,6 +668,17 @@ + TRUE, + settings, + 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/src/connection-editor/page-wifi.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-wifi.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-wifi.h 2013-09-13 20:06:35.792659987 +0200 +@@ -62,6 +62,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_WIFI_H__ */ +Index: network-manager-applet/src/connection-editor/page-wimax.c +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-wimax.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-wimax.c 2013-09-13 20:06:35.792659987 +0200 +@@ -225,6 +225,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data) + { + NMConnection *connection; +Index: network-manager-applet/src/connection-editor/page-wimax.h +=================================================================== +--- network-manager-applet.orig/src/connection-editor/page-wimax.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/connection-editor/page-wimax.h 2013-09-13 20:06:35.796660035 +0200 +@@ -56,6 +56,7 @@ + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, ++ NMClient *client, + gpointer user_data); + + #endif /* __PAGE_WIMAX_H__ */ +Index: network-manager-applet/src/gnome-bluetooth/nma-bt-device.c +=================================================================== +--- network-manager-applet.orig/src/gnome-bluetooth/nma-bt-device.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/gnome-bluetooth/nma-bt-device.c 2013-09-13 20:06:35.796660035 +0200 +@@ -354,6 +354,7 @@ + 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); + +@@ -380,6 +381,7 @@ + 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; +@@ -399,6 +401,7 @@ + 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); +@@ -426,6 +429,7 @@ + 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; +@@ -1011,6 +1015,7 @@ + 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 */ +Index: network-manager-applet/src/libnm-gtk/nm-wifi-dialog.c +=================================================================== +--- network-manager-applet.orig/src/libnm-gtk/nm-wifi-dialog.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/libnm-gtk/nm-wifi-dialog.c 2013-09-13 20:06:35.796660035 +0200 +@@ -38,6 +38,7 @@ + #include "nm-wifi-dialog.h" + #include "wireless-security.h" + #include "nm-ui-utils.h" ++#include "utils.h" + + G_DEFINE_TYPE (NMAWifiDialog, nma_wifi_dialog, GTK_TYPE_DIALOG) + +@@ -1221,6 +1222,9 @@ + 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/src/mobile-helpers.c +=================================================================== +--- network-manager-applet.orig/src/mobile-helpers.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/mobile-helpers.c 2013-09-13 20:06:35.796660035 +0200 +@@ -172,6 +172,7 @@ + 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); + } else if (method->devtype == NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) { +@@ -182,6 +183,7 @@ + NM_SETTING_GSM_USERNAME, method->username, + NM_SETTING_GSM_PASSWORD, method->password, + NM_SETTING_GSM_APN, method->gsm_apn, ++ NM_SETTING_GSM_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_AGENT_OWNED, + NULL); + nm_connection_add_setting (connection, setting); + } else +@@ -210,6 +212,7 @@ + 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/src/utils/utils.c +=================================================================== +--- network-manager-applet.orig/src/utils/utils.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/utils/utils.c 2013-09-13 20:06:35.796660035 +0200 +@@ -209,3 +209,10 @@ + } + } + ++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/src/utils/utils.h +=================================================================== +--- network-manager-applet.orig/src/utils/utils.h 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/utils/utils.h 2013-09-13 20:06:35.796660035 +0200 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -53,6 +54,8 @@ + 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/src/wireless-security/ws-wep-key.c +=================================================================== +--- network-manager-applet.orig/src/wireless-security/ws-wep-key.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/wireless-security/ws-wep-key.c 2013-09-13 20:06:35.796660035 +0200 +@@ -142,6 +142,7 @@ + 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 @@ + 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 @@ + 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 (s_con)) ++ 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]); +Index: network-manager-applet/src/wireless-security/ws-wpa-psk.c +=================================================================== +--- network-manager-applet.orig/src/wireless-security/ws-wpa-psk.c 2013-09-13 20:06:35.800660084 +0200 ++++ network-manager-applet/src/wireless-security/ws-wpa-psk.c 2013-09-13 20:06:35.796660035 +0200 +@@ -92,11 +92,13 @@ + { + 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 @@ + 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) { diff -Nru network-manager-applet-0.9.8.8/debian/patches/series network-manager-applet-0.9.8.8/debian/patches/series --- network-manager-applet-0.9.8.8/debian/patches/series 2014-03-12 03:11:14.000000000 +0000 +++ network-manager-applet-0.9.8.8/debian/patches/series 2014-03-18 18:48:23.000000000 +0000 @@ -18,3 +18,4 @@ rebuild_menu_after_init.patch 0001_Move_on_with_enter_in_the_country_page_of_the_new_mobile_wizard.patch set_atk_relations.patch +11-user-connections.patch