File NetworkManager-gnome-private-connections-by-default.patch of Package NetworkManager-gnome.openSUSE_12.1_Update

diff --git a/src/applet-device-cdma.c b/src/applet-device-cdma.c
index 7894df2..7e63ca0 100644
--- a/src/applet-device-cdma.c
+++ b/src/applet-device-cdma.c
@@ -148,6 +148,10 @@ 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);
 	}
 
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index d2740ef..dc1f8ab 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -174,6 +174,10 @@ 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);
 	}
 
diff --git a/src/applet-device-wifi.c b/src/applet-device-wifi.c
index 79ac78b..e11945f 100644
--- a/src/applet-device-wifi.c
+++ b/src/applet-device-wifi.c
@@ -467,6 +467,13 @@ _do_new_auto_connection (NMApplet *applet,
 		nm_connection_add_setting (connection, NM_SETTING (s_8021x));
 	}
 
+	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);
+
 	/* If it's an 802.1x connection, we need more information, so pop up the
 	 * Dialog Of Doom.
 	 */
diff --git a/src/applet-device-wimax.c b/src/applet-device-wimax.c
index 5a4a6c2..ed7646c 100644
--- a/src/applet-device-wimax.c
+++ b/src/applet-device-wimax.c
@@ -94,6 +94,7 @@ wimax_new_auto_connection (NMDevice *device,
 				  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));
 
diff --git a/src/applet-device-wired.c b/src/applet-device-wired.c
index cc53a24..ff6d513 100644
--- a/src/applet-device-wired.c
+++ b/src/applet-device-wired.c
@@ -86,6 +86,7 @@ wired_new_auto_connection (NMDevice *device,
 	              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));
 
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c
index 2f59416..47de474 100644
--- a/src/connection-editor/ce-page.c
+++ b/src/connection-editor/ce-page.c
@@ -510,6 +510,7 @@ ce_page_new_connection (const char *format,
 
 	g_free (uuid);
 	g_free (id);
+	nm_setting_connection_add_permission (s_con, "user", g_get_user_name(), NULL);
 
 	return connection;
 }
diff --git a/src/gnome-bluetooth/bt-widget.c b/src/gnome-bluetooth/bt-widget.c
index dade65c..303c054 100644
--- a/src/gnome-bluetooth/bt-widget.c
+++ b/src/gnome-bluetooth/bt-widget.c
@@ -256,6 +256,10 @@ 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 */
@@ -421,6 +425,10 @@ dun_new_cdma (NMAMobileWizardAccessMethod *method)
 	              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;
@@ -470,6 +478,10 @@ dun_new_gsm (NMAMobileWizardAccessMethod *method)
 	              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;
openSUSE Build Service is sponsored by