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 <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2021-05-06 19:08:34 +09:00
parent d6fe82d3d1
commit 53bdc6288f
1 changed files with 2 additions and 1 deletions

View File

@ -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);