From 53bdc6288f9b474e53f06088130e304cee41b12d Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 6 May 2021 19:08:34 +0900 Subject: [PATCH] scd: Recover the partial match for PORTSTR for PC/SC. * scd/apdu.c (apdu_open_reader): Allow partial match of PORTSTR again just like 2.2 does. -- Signed-off-by: NIIBE Yutaka --- scd/apdu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scd/apdu.c b/scd/apdu.c index 44ef445c8..8a48d6769 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2239,7 +2239,8 @@ apdu_open_reader (struct dev_list *dl) log_debug ("apdu_open_reader: new device=%s\n", rdrname); /* When reader string is specified, check if it is the one. */ - if (readerno < 0 && strcmp (rdrname, dl->portstr) != 0) + if (readerno < 0 + && strncmp (rdrname, dl->portstr, strlen (dl->portstr)) != 0) continue; slot = open_pcsc_reader (rdrname);