From 2251e099a3675cc63a886641bc1fbb8e65dc0fad Mon Sep 17 00:00:00 2001 From: mouring Date: Mon, 6 Aug 2001 21:33:44 +0000 Subject: [PATCH] - jakob@cvs.openbsd.org 2001/07/31 12:53:34 [scard.c] close smartcard connection if card is missing --- ChangeLog | 3 +++ scard.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 09abf431..afe31343 100644 --- a/ChangeLog +++ b/ChangeLog @@ -84,6 +84,9 @@ [sftp-int.c sftp-server.c] avoid paths beginning with "//"; ok markus@ + - jakob@cvs.openbsd.org 2001/07/31 12:53:34 + [scard.c] + close smartcard connection if card is missing 20010803 - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on diff --git a/scard.c b/scard.c index 9f22fdf3..8c53c66d 100644 --- a/scard.c +++ b/scard.c @@ -24,7 +24,7 @@ #ifdef SMARTCARD #include "includes.h" -RCSID("$OpenBSD: scard.c,v 1.9 2001/07/31 08:41:10 jakob Exp $"); +RCSID("$OpenBSD: scard.c,v 1.10 2001/07/31 12:53:34 jakob Exp $"); #include #include @@ -64,6 +64,7 @@ sc_open(void) if (! sectok_cardpresent(sc_fd)) { debug("smartcard in reader %d not present, skipping", sc_reader_num); + sc_close(); return SCARD_ERROR_NOCARD; } if (sectok_reset(sc_fd, 0, NULL, &sw) <= 0) { -- 2.45.2