Bug 7946 - "undefined symbol: pcsc_stringify_error" in ThinLinc 4.14.0
Summary: "undefined symbol: pcsc_stringify_error" in ThinLinc 4.14.0
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Smart card (show other bugs)
Version: 4.14.0
Hardware: PC Linux Red Hat
: P2 Blocker
Target Milestone: 4.15.0
Assignee: Samuel Mannehed
URL:
Keywords: relnotes, tobfa_tester
Depends on:
Blocks:
 
Reported: 2022-06-11 08:55 CEST by 4du662g893
Modified: 2023-07-05 09:26 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description 4du662g893 2022-06-11 08:55:46 CEST
[root] openconnect
openconnect: symbol lookup error: /lib64/libopenconnect.so.5: undefined symbol: pcsc_stringify_error

[root] ldd /sbin/openconnect | grep pcsc
   libpcsclite.so.1 => /opt/thinlinc/lib64/libpcsclite.so.1 (0x00007fb4826ad000)

[root@xps thinlinc] readelf -a /opt/thinlinc/lib64/libpcsclite.so.1 | grep pcsc_stringify_error

[root@xps thinlinc] readelf -a /lib64/libpcsclite.so.1 | grep pcsc_stringify_error
    53: 0000000000003bb0   820 FUNC    GLOBAL DEFAULT   13 pcsc_stringify_error

So, the ThinLinc version of libpcsclite.so.1 is missing the required symbol pcsc_stringify_error, which breaks openconnect-8.10-6.fc34.x86_64.
Comment 2 Pierre Ossman cendio 2022-06-13 07:21:30 CEST
Thank you for reporting! This seems to have been an accidental change in 4.14.0. We'll have a look at getting that symbol back in the upcoming release.
Comment 5 Samuel Mannehed cendio 2022-08-16 16:36:28 CEST
The pcsc_stringify_error symbol has now been restored. I have verified that I could reproduce the error with openconnect in 4.14.0, and that things now work properly after the fix.
Comment 7 Samuel Mannehed cendio 2022-08-17 14:57:32 CEST
We should properly review the other things that were changed, along with what removed the pcsc_stringify_error symbol, before considering this resolved.
Comment 8 Samuel Mannehed cendio 2022-08-19 15:34:37 CEST
I have had a look at the patch now.

> * _A datatypes should no longer be used, see
>   https://ludovicrousseau.blogspot.com/2010/08/pcsc-lite-16x-breaks-some-programs-at.html
> 
> * Unfortunately, osx64 still uses pcsc-lite 1.4.0, which lacks
>   LPSCARD_READERSTATE. But the LP/NP concept is obsolete anyway.

Looks good, we now use SCARD_READERSTATE* instead, which is equivalent:

https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms926425(v=msdn.10)


> * g_rgSCard* constants needs to be "const"

Seems correct, I have verified that the constants are "const" with v1.7.3 of PCSC and later versions:

https://github.com/LudovicRousseau/PCSC/blob/pcsc-1.9.0/src/winscard_clnt.c
Comment 9 Tobias cendio 2022-08-22 11:39:40 CEST
Tested using server versions official release 4.14.0 (pre-fix) and developers build #2774
(post-fix) on Ubuntu22.04 and RHEL8, and developers client build #2679 on Fedora36.

Managed to reproduce the openconnect problem in 4.14.0 mentioned by bug
reporter, which disappears when upgrading the server with the fix in place.
Comment 10 Tobias cendio 2022-08-22 12:26:34 CEST
The pertinent issues are resolved, rendering this bug fixed -- closing.

Note You need to log in before you can comment on or make changes to this bug.