Home GnuPG
Diffusion GnuPG 9934889415d4

scd: Fix "Conflicting usage" bug.
9934889415d4Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

scd: Fix "Conflicting usage" bug.

* scd/apdu.c (apdu_close_reader): Call CLOSE_READER method even if we
  got an error from apdu_disconnect.
* scd/app-common.h (no_reuse): Remove.
* scd/app.c (application_notify_card_reset): Deallocate APP here.
(select_application, release_application): Don't use NO_REUSE.

Reproducible scenario: Invoke gpg --card-edit session from a terminal.
Invoke another gpg --card-edit session from another. Remove a token.
Insert a token again. Type RET on both terminals. One of terminal
answers "Conflicting usage".

Perhaps, having NO_REUSE field was to avoid race conditions. Now,
APP can be safely deallocated by application_notify_card_reset.

Thanks to the2nd.

(backport of commit f42c50dbf00c2e6298ca6830cbe6d36805fa54a3)

Details

Provenance
gniibeAuthored on Dec 3 2015, 3:26 AM
Parents
rG01fa4c7b8b82: doc: Don't install gpg-zip.1.
Branches
Unknown
Tags
Unknown

Event Timeline

NIIBE Yutaka <gniibe@fsij.org> committed rG9934889415d4: scd: Fix "Conflicting usage" bug. (authored by NIIBE Yutaka <gniibe@fsij.org>).Dec 15 2015, 1:48 AM