From 5d430b674265cbfaafb21414a037a856c306f476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 20 Apr 2022 10:17:45 +0200 Subject: [PATCH] - fix initialization (#2075851, #2074587) --- opencryptoki-3.17.0-init.patch | 25 +++++++++++++++++++++++++ opencryptoki.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 opencryptoki-3.17.0-init.patch diff --git a/opencryptoki-3.17.0-init.patch b/opencryptoki-3.17.0-init.patch new file mode 100644 index 0000000..d45675b --- /dev/null +++ b/opencryptoki-3.17.0-init.patch @@ -0,0 +1,25 @@ +From 3fea29baa97be9c132a8189eb00c7a782900d472 Mon Sep 17 00:00:00 2001 +From: Ingo Franzki +Date: Thu, 18 Nov 2021 10:15:53 +0100 +Subject: [PATCH] API: Unlock GlobMutex if user and group check fails + +Closes: https://github.com/opencryptoki/opencryptoki/issues/493 + +Signed-off-by: Ingo Franzki +--- + usr/lib/api/api_interface.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/lib/api/api_interface.c b/usr/lib/api/api_interface.c +index 6fac7e0bf..20f605c3a 100644 +--- a/usr/lib/api/api_interface.c ++++ b/usr/lib/api/api_interface.c +@@ -2872,7 +2872,7 @@ CK_RV C_Initialize(CK_VOID_PTR pVoid) + + rc = check_user_and_group(); + if (rc != CKR_OK) +- return rc; ++ goto done; + + if (!Anchor) { + Anchor = (API_Proc_Struct_t *) malloc(sizeof(API_Proc_Struct_t)); diff --git a/opencryptoki.spec b/opencryptoki.spec index 1af311f..660ddb0 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -1,7 +1,7 @@ Name: opencryptoki Summary: Implementation of the PKCS#11 (Cryptoki) specification v3.0 Version: 3.17.0 -Release: 6%{?dist} +Release: 7%{?dist} License: CPL URL: https://github.com/opencryptoki/opencryptoki Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz @@ -22,6 +22,7 @@ Patch300: opencryptoki-pkcsslotd-pidfile.patch Patch301: opencryptoki-3.17-avoid-deadlock-when-stopping-event-thread.patch Patch302: opencryptoki-3.17.0-openssl-cleanup-for-opencryptoki.patch Patch303: opencryptoki-3.17-tokversion.patch +Patch304: opencryptoki-3.17.0-init.patch Requires(pre): coreutils Requires: (selinux-policy >= 34.9-1 if selinux-policy-targeted) @@ -331,6 +332,9 @@ fi %changelog +* Wed Apr 20 2022 Dan HorĂ¡k - 3.17.0-7 +- fix initialization (#2075851, #2074587) + * Wed Apr 06 2022 Than Ngo - 3.17.0-6 - add tokversion