From: Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
Subject: Avoid trying to set the pin dialog to save password (and require a
 keyring) when the user doesn't have MODIFY_OWN permissions.

---
 src/applet-device-gsm.c |    7 +++++++
 1 file changed, 7 insertions(+)

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
+++ network-manager-applet-0.9.4.1/src/applet-device-gsm.c
@@ -1013,12 +1013,18 @@ unlock_dialog_new (NMDevice *device, Gsm
 	guint32 label1_min = 0, label2_min = 0, label3_min = 0;
 	guint32 label1_max = 0, label2_max = 0, label3_max = 0;
 	guint32 unlock_code = 0;
+	NMClientPermission perm;
 
 	g_return_if_fail (info->unlock_required != NULL);
 
 	if (info->dialog)
 		return;
 
+	perm = NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN;
+	if (! (   info->applet->permissions[perm] == NM_CLIENT_PERMISSION_RESULT_YES
+               || info->applet->permissions[perm] == NM_CLIENT_PERMISSION_RESULT_AUTH))
+		return;
+
 	/* Figure out the dialog text based on the required unlock code */
 	device_desc = utils_get_device_description (device);
 	if (!strcmp (info->unlock_required, "sim-pin")) {
