[network-manager-applet/aleksander/mm1-applet] applet: when auto-unlock with PIN fails, remove PIN from keyring
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/aleksander/mm1-applet] applet: when auto-unlock with PIN fails, remove PIN from keyring
- Date: Tue, 18 Dec 2012 11:18:59 +0000 (UTC)
commit 4505f29f84edad60baae573bb0bc3551be0129bf
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Dec 18 12:16:46 2012 +0100
applet: when auto-unlock with PIN fails, remove PIN from keyring
We need to remove the PIN from the keyring when auto-unlock try fails, even
before launching the dialog to ask for the PIN to the user. Otherwise, the user
may just close the dialog without entering the PIN, and the next times the
auto-unlock is tried using the same wrong PIN as before will end up failing and
ultimately locking the device asking for PUK.
src/applet-device-broadband.c | 3 +++
src/applet-device-gsm.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index f1e61d6..e0a0031 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -331,6 +331,9 @@ autounlock_sim_send_pin_ready (MMSim *sim,
error->message);
g_error_free (error);
+ /* Remove PIN from keyring right away */
+ mobile_helper_delete_pin_in_keyring (mm_modem_get_device_identifier (info->mm_modem));
+
/* Ask the user */
unlock_dialog_new (info->device, info);
}
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index 4ffebcd..1d19a63 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -787,6 +787,10 @@ keyring_unlock_pin_reply (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user
info->simid ? info->simid : "(unknown)",
dbus_g_error_get_name (error),
error->message);
+
+ /* Remove PIN from keyring right away */
+ mobile_helper_delete_pin_in_keyring (info->devid);
+
/* Ask the user */
unlock_dialog_new (info->device, info);
g_clear_error (&error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]