1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-04 03:08:57 +02:00
gnupg/scd
NIIBE Yutaka 8e206c1721
scd: Internal CCID driver: Fix a race condition on close.
* scd/ccid-driver.c (ccid_require_get_status): For VENDOR_SCM reader,
return 0 only at the initial call.
(bulk_in): Don't detect an error for VENDOR_SCM reader, just kicking
the loop, to invoke scd_update_reader_status_file, which calls
ccid_slot_status again.
(ccid_slot_status): Move the call of ccid_vendor_specific_setup to...
(ccid_get_atr): ... here.

--

For readers with interrupt transfer support, it is only intr_cb which
sets handle->powered_off to 1.  Keeping this condition makes no race.
The function ccid_slot_status can also detect a communication error,
which causes apdu_close_reader (but not setting ->powered_off).

GnuPG-bug-id: 5121
Fixes-commit: 920f258eb6
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit 484bafda4d)
2020-11-09 13:26:40 +01:00
..
apdu.c scd: Clean up the structure for future fix of PC/SC. 2020-10-06 11:17:58 +09:00
apdu.h scd: Map some error codes from libusb to ccid-driver error codes. 2020-10-06 11:14:59 +09:00
app-common.h scd:p15: Support signing with CardOS 5 cards. 2020-04-01 16:00:31 +02:00
app-dinsig.c scd:p15: Support signing with CardOS 5 cards. 2020-04-01 16:00:31 +02:00
app-geldkarte.c Remove -I option to common. 2017-03-07 20:25:54 +09:00
app-help.c scd:p15: Support signing with CardOS 5 cards. 2020-04-01 16:00:31 +02:00
app-nks.c scd: Factor common PIN status check out. 2020-04-15 15:35:55 +02:00
app-openpgp.c scd: Add a workaround for Yubikey. 2020-10-06 17:15:49 +09:00
app-p15.c common: Change argument order of log_printhex. 2020-05-12 18:51:47 +02:00
app-sc-hsm.c scd:p15: Support signing with CardOS 5 cards. 2020-04-01 16:00:31 +02:00
app.c Replace most of the remaining stdio calls by estream calls. 2020-10-21 21:09:38 +02:00
atr.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
atr.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ccid-driver.c scd: Internal CCID driver: Fix a race condition on close. 2020-11-09 13:26:40 +01:00
ccid-driver.h scd: Clean up the structure for future fix of PC/SC. 2020-10-06 11:17:58 +09:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
command.c card: Run factory-reset in locked stated. 2020-11-09 13:04:38 +01:00
iso7816.c scd: Map some error codes from libusb to ccid-driver error codes. 2020-10-06 11:14:59 +09:00
iso7816.h scd: Factor common PIN status check out. 2020-04-15 15:35:55 +02:00
Makefile.am w32: Add manifest files to most binaries 2020-10-02 17:04:12 +02:00
scdaemon-w32info.rc w32: Add manifest files to most binaries 2020-10-02 17:04:12 +02:00
scdaemon.c build: Always use EXTERN_UNLESS_MAIN_MODULE pattern. 2020-02-10 16:37:34 +01:00
scdaemon.h build: Always use EXTERN_UNLESS_MAIN_MODULE pattern. 2020-02-10 16:37:34 +01:00
scdaemon.w32-manifest.in w32: Add manifest files to most binaries 2020-10-02 17:04:12 +02:00