Bug 1218797

Summary: OpenSC fails when child calls C_Initialize() after fork().
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: openscAssignee: Nikos Mavrogiannopoulos <nmavrogi>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: gmazyland, kalevlember, nmavrogi, stefw, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: opensc-0.15.0-2.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-14 12:58:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1135932, 1236526    
Attachments:
Description Flags
simple test case none

Description David Woodhouse 2015-05-05 22:18:16 UTC
Created attachment 1022342 [details]
simple test case

The PKCS#11 Usage Guide recommends calling C_Initialize() in the child after a fork(), on any PKCS#11 provider module which was loaded in the parent.

OpenSC craps itself if you do, because it confuses pcscd.

Comment 1 David Woodhouse 2015-05-05 22:20:36 UTC
cf. http://sourceforge.net/p/opensc/mailman/message/34073754/

Comment 2 David Woodhouse 2015-06-23 10:47:04 UTC
I added a test case for this in the 0.15.0 release. Run pkcs11-tool --test-fork and watch it fail. Unfortunately a *fix* didn't make it to the release.

Comment 3 Nikos Mavrogiannopoulos 2015-07-03 08:13:30 UTC
https://github.com/OpenSC/OpenSC/pull/493

Comment 4 Fedora Update System 2015-08-05 12:37:45 UTC
opensc-0.15.0-2.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/opensc-0.15.0-2.fc23

Comment 5 Fedora Update System 2015-08-15 02:18:34 UTC
opensc-0.15.0-2.fc23 has been pushed to the Fedora 23 stable repository.  If problems still persist, please make note of it in this bug report.