File gnome-control-center-private-connections-by-default.patch of Package gnome-control-center.openSUSE_12.1_Update
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index ca31b0d..424ae38 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -2687,8 +2687,10 @@ wireless_ap_changed_cb (GtkComboBox *combo_box, CcNetworkPanel *panel)
NetObject *object;
NMConnection *connection;
NMConnection *connection_activate = NULL;
+ NMConnection *partial;
NMDevice *device;
NMSettingWireless *setting_wireless;
+ NMSettingConnection *setting_con;
if (panel->priv->updating_device)
goto out;
@@ -2757,8 +2759,12 @@ wireless_ap_changed_cb (GtkComboBox *combo_box, CcNetworkPanel *panel)
/* create one, as it's missing */
g_debug ("no existing connection found for %s, creating",
ssid_target);
+ partial = nm_connection_new ();
+ setting_con = nm_setting_connection_new ();
+ nm_connection_add_setting (partial, NM_SETTING (setting_con));
+ nm_setting_connection_add_permission (setting_con, "user", g_get_user_name(), NULL);
nm_client_add_and_activate_connection (panel->priv->client,
- NULL,
+ partial,
device, object_path,
connection_add_activate_cb, panel);
out:
@@ -3010,6 +3016,7 @@ start_shared_connection (CcNetworkPanel *panel)
"id", "Hotspot",
"autoconnect", FALSE,
NULL);
+ nm_setting_connection_add_permission (sc, "user", g_get_user_name(), NULL);
nm_connection_add_setting (c, (NMSetting *)sc);
sw = (NMSettingWireless *)nm_setting_wireless_new ();
diff --git a/panels/network/network-dialogs.c b/panels/network/network-dialogs.c
index efe1704..f8419e5 100644
--- a/panels/network/network-dialogs.c
+++ b/panels/network/network-dialogs.c
@@ -293,6 +293,7 @@ cc_network_panel_connect_to_8021x_network (CcNetworkPanel *panel,
uuid = nm_utils_uuid_generate ();
g_object_set (s_con, NM_SETTING_CONNECTION_UUID, uuid, NULL);
g_free (uuid);
+ nm_setting_connection_add_permission (s_con, "user", g_get_user_name(), NULL);
nm_connection_add_setting (connection, NM_SETTING (s_con));
s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -393,6 +394,10 @@ cdma_mobile_wizard_done (NMAMobileWizard *wizard,
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);
}
@@ -456,6 +461,10 @@ gsm_mobile_wizard_done (NMAMobileWizard *wizard,
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);
}