summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2005-12-06 17:44:20 +0100
committerWerner Koch <wk@gnupg.org>2005-12-06 17:44:20 +0100
commit496c3b5572e7ab3a9355bd26c9050d4eaf42929e (patch)
treeffb9f57a6c4383b0d7857118e90f4e371f4a56a9 /scd
parentPreparing an interim release (diff)
downloadgnupg2-496c3b5572e7ab3a9355bd26c9050d4eaf42929e.tar.xz
gnupg2-496c3b5572e7ab3a9355bd26c9050d4eaf42929e.zip
Print warning for missing pcsc-wrapper
Diffstat (limited to 'scd')
-rw-r--r--scd/ChangeLog5
-rw-r--r--scd/apdu.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/scd/ChangeLog b/scd/ChangeLog
index 008d84080..64c3bdc59 100644
--- a/scd/ChangeLog
+++ b/scd/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-06 Werner Koch <wk@g10code.com>
+
+ * apdu.c (open_pcsc_reader): Check that pcsc-wrapper is actually
+ installed.
+
2005-11-23 Werner Koch <wk@g10code.com>
* app-nks.c (verify_pin): Give a special error message for a Nullpin.
diff --git a/scd/apdu.c b/scd/apdu.c
index f59d832d4..5a5f18b43 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -1328,6 +1328,14 @@ open_pcsc_reader (const char *portstr)
int err;
unsigned int dummy_status;
int sw = SW_HOST_CARD_IO_ERROR;
+ const char *wrapperpgm = GNUPG_LIBDIR "/pcsc-wrapper";
+
+ if (access (wrapperpgm, X_OK))
+ {
+ log_error ("can't run PC/SC access module `%s': %s\n",
+ wrapperpgm, strerror (errno));
+ return -1;
+ }
slot = new_reader_slot ();
if (slot == -1)
@@ -1400,7 +1408,7 @@ open_pcsc_reader (const char *portstr)
close(i);
errno = 0;
- execl (GNUPG_LIBDIR "/pcsc-wrapper",
+ execl (wrapperpgm,
"pcsc-wrapper",
"--",
"1", /* API version */