Aleksander Morgado
fd052c8e58
base-sim: don't allow sending PIN/PUK if not required
This avoids issues when e.g. sending SIM-PIN while the modem is
already unlocked or when SIM-PIN is not enabled.
Under those conditions, the needlessly sent SIM-PIN unlock attempt may
fail while libmm-glib/mmcli reports a successful operation. E.g.:
# mmcli --sim=/org/freedesktop/ModemManager1/SIM/0 --pin=3497
successfully sent PIN code to the SIM
But in reality...
Wed Nov 20 14:38:52 2019 daemon.debug [4254]: <debug> [1574260732.489513] Verifying PIN...
Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<< length = 27
<<<<<< data = 01:1A:00:00:0B:02:00:09:00:26:00:0E:00:02:06:00:01:04:33:34:39:37:01:02:00:06:00
Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 26
<<<<<< flags = 0x00
<<<<<< service = "uim"
<<<<<< client = 2
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 9
<<<<<< tlv_length = 14
<<<<<< message = "Verify PIN" (0x0026)
<<<<<< TLV:
<<<<<< type = "Info" (0x02)
<<<<<< length = 6
<<<<<< value = 01:04:33:34:39:37
<<<<<< translated = [ pin_id = 'pin1' pin_value = '3497' ]
Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<< length = 30
<<<<<< data = 01:1D:00:80:0B:02:02:09:00:26:00:11:00:02:04:00:01:00:52:00:13:02:00:69:84:10:02:00:03:0A
Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] received generic response (translated)...
<<<<<< QMUX:
<<<<<< length = 29
<<<<<< flags = 0x80
<<<<<< service = "uim"
<<<<<< client = 2
<<<<<< QMI:
<<<<<< flags = "response"
<<<<<< transaction = 9
<<<<<< tlv_length = 17
<<<<<< message = "Verify PIN" (0x0026)
<<<<<< TLV:
<<<<<< type = "Result" (0x02)
<<<<<< length = 4
<<<<<< value = 01:00:52:00
<<<<<< translated = FAILURE: AccessDenied
As we already know what the current lock status is, just abort the
user operation if the unlock operation isn't required.
2020-02-12 09:41:10 +00:00
..
2020-01-31 14:52:49 +01:00
2020-01-31 14:52:49 +01:00
2019-08-29 20:07:03 +00:00
2019-08-29 20:07:03 +00:00
2019-08-29 20:07:03 +00:00
2018-06-02 16:54:37 +02:00
2019-10-11 07:27:59 +00:00
2020-01-30 11:59:14 +01:00
2020-01-23 11:50:23 +00:00
2020-01-23 11:50:23 +00:00
2020-01-30 11:59:14 +01:00
2017-03-28 22:46:35 +02:00
2019-12-05 15:45:38 +01:00
2019-10-17 08:31:46 +00:00
2020-01-28 10:33:50 +01:00
2017-12-05 10:58:29 +01:00
2020-01-31 15:18:35 +01:00
2020-01-31 15:18:35 +01:00
2020-01-30 11:59:14 +01:00
2020-01-23 11:50:23 +00:00
2020-02-12 09:41:10 +00:00
2019-10-17 10:51:50 +02:00
2020-01-30 11:59:14 +01:00
2018-01-25 09:52:12 +01:00
2020-01-30 11:59:14 +01:00
2015-12-03 12:01:14 +01:00
2020-01-30 11:59:15 +01:00
2014-07-06 16:55:29 +02:00
2020-01-30 11:59:14 +01:00
2016-07-15 19:31:45 +02:00
2020-01-30 11:59:14 +01:00
2017-04-18 18:08:57 +02:00
2020-01-31 15:18:35 +01:00
2014-05-20 09:32:29 +02:00
2020-01-31 14:52:49 +01:00
2012-08-29 17:26:42 +02:00
2020-02-06 15:16:46 +00:00
2019-10-11 09:24:22 +00:00
2019-07-11 23:21:00 +02:00
2019-07-11 23:21:00 +02:00
2020-01-31 14:52:49 +01:00
2018-08-21 16:50:15 +00:00
2020-01-03 20:43:45 +01:00
2017-12-05 10:58:29 +01:00
2020-01-06 20:46:06 +00:00
2020-01-06 20:46:06 +00:00
2019-12-17 10:52:13 +01:00
2012-10-04 10:17:13 +02:00
2019-09-11 18:01:50 +00:00
2019-09-11 18:01:50 +00:00
2020-01-30 11:59:14 +01:00
2018-08-21 16:50:15 +00:00
2020-01-30 11:59:14 +01:00
2020-01-06 20:17:08 +00:00
2020-01-30 11:59:14 +01:00
2014-02-13 13:40:01 +01:00
2020-01-30 11:59:14 +01:00
2019-01-03 18:53:52 +00:00
2020-02-07 14:42:16 +00:00
2019-04-02 08:40:26 +00:00
2020-01-30 11:59:14 +01:00
2016-03-09 14:43:08 +01:00
2020-01-30 11:59:14 +01:00
2014-07-01 15:42:21 +02:00
2020-01-30 11:59:14 +01:00
2013-08-21 12:34:54 +02:00
2020-02-12 09:41:10 +00:00
2012-03-15 14:14:39 +01:00
2020-01-30 11:59:14 +01:00
2019-07-11 23:21:00 +02:00
2020-02-06 15:16:46 +00:00
2019-10-17 10:51:50 +02:00
2020-02-12 09:41:10 +00:00
2020-02-12 09:41:10 +00:00
2020-01-30 11:59:14 +01:00
2017-06-21 13:08:17 +02:00
2020-01-31 14:52:49 +01:00
2018-12-07 16:20:53 +00:00
2020-01-31 14:52:49 +01:00
2019-10-11 08:16:04 +00:00
2020-01-31 14:52:49 +01:00
2020-01-31 15:18:35 +01:00
2020-01-30 11:59:14 +01:00
2017-12-05 10:58:29 +01:00
2020-01-30 11:59:14 +01:00
2019-09-11 18:01:50 +00:00
2020-01-22 13:15:08 +01:00
2018-08-23 09:44:28 +02:00
2013-04-04 19:26:51 +02:00
2020-01-31 15:18:35 +01:00
2020-01-31 15:18:35 +01:00
2018-08-21 17:02:39 +00:00
2020-02-01 12:52:30 +01:00
2020-01-22 13:56:59 +01:00
2019-06-03 03:50:22 +00:00
2014-02-13 13:40:55 +01:00
2016-01-23 11:19:19 +01:00
2014-02-13 13:39:54 +01:00
2020-01-31 15:18:35 +01:00
2016-07-27 10:44:43 -05:00
2020-01-30 19:09:52 +01:00
2019-06-03 03:50:22 +00:00
2016-09-29 15:43:05 +02:00
2019-10-15 13:19:10 +02:00
2012-08-06 20:06:46 +02:00
2012-08-06 20:06:46 +02:00
2013-06-25 11:48:43 +02:00
2013-04-04 19:26:51 +02:00
2020-01-30 11:59:14 +01:00
2019-04-02 12:14:03 +02:00
2019-11-27 10:11:43 +00:00
2017-09-07 19:06:55 +02:00
2014-07-06 16:55:29 +02:00
2020-01-31 14:52:49 +01:00
2016-02-11 10:52:09 +01:00
2016-03-21 23:48:46 +01:00
2015-02-07 12:57:48 +01:00
2019-07-15 13:42:45 +02:00
2014-07-06 16:55:29 +02:00
2017-07-18 10:33:00 +02:00
2014-07-06 16:55:29 +02:00
2020-01-31 14:52:49 +01:00
2017-12-18 10:33:46 +01:00
2020-01-31 14:52:49 +01:00
2017-12-18 10:33:46 +01:00
2013-10-25 19:47:18 +02:00
2017-12-18 10:33:46 +01:00
2017-06-30 11:58:53 +02:00
2014-07-06 16:55:29 +02:00
2020-01-30 11:59:14 +01:00