From f6ec9d4e649a98b7e757dfc7f8c981472952ccf4 Mon Sep 17 00:00:00 2001 From: Alexey Berezhok Date: Wed, 5 Apr 2023 17:57:00 +0300 Subject: [PATCH] Added fix for pesign-client for db unlocking --- ...sign-client-without-all-source-renew.patch | 50 +++++++++++++++++++ SOURCES/pesign.patches | 1 + SPECS/pesign.spec | 5 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0007-Fix-only-pesign-client-without-all-source-renew.patch diff --git a/SOURCES/0007-Fix-only-pesign-client-without-all-source-renew.patch b/SOURCES/0007-Fix-only-pesign-client-without-all-source-renew.patch new file mode 100644 index 0000000..f26c2b5 --- /dev/null +++ b/SOURCES/0007-Fix-only-pesign-client-without-all-source-renew.patch @@ -0,0 +1,50 @@ +From 833d30c68f4b72ee52f49d3aa3abc700f7f32329 Mon Sep 17 00:00:00 2001 +From: Alexey Berezhok +Date: Tue, 4 Apr 2023 19:00:21 +0300 +Subject: [PATCH] Fix pesign + +--- + src/password.c | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/src/password.c b/src/password.c +index 05add9a..7e4d6b6 100644 +--- a/src/password.c ++++ b/src/password.c +@@ -365,17 +365,25 @@ err: + } + + char * +-get_password_passthrough(PK11SlotInfo *slot UNUSED, +- PRBool retry, void *arg) ++get_password_passthrough(PK11SlotInfo *slot UNUSED, PRBool retry, void *arg) + { +- if (retry || !arg) +- return NULL; ++ cms_context *cms; ++ secuPWData *pwdata; ++ ++ if (retry || !arg) ++ return NULL; + +- char *ret = strdup(arg); +- if (!ret) +- err(1, "Could not allocate memory"); ++ cms = (cms_context *)arg; ++ pwdata = &cms->pwdata; + +- return ret; ++ if (pwdata->source != PW_PLAINTEXT) ++ return NULL; ++ ++ char *ret = strdup(pwdata->data); ++ if (!ret) ++ err(1, "Could not allocate memory"); ++ ++ return ret; + } + + char * +-- +2.39.1 + diff --git a/SOURCES/pesign.patches b/SOURCES/pesign.patches index d66e14a..a474356 100644 --- a/SOURCES/pesign.patches +++ b/SOURCES/pesign.patches @@ -3,3 +3,4 @@ Patch0002: 0002-Disable-pragmas-for-warnings-that-are-too-old.patch Patch0003: 0003-Add-D_GLIBCXX_ASSERTIONS-to-CPPFLAGS.patch Patch0004: 0004-macros.pesign-handle-centos-like-rhel-with-rhelver.patch Patch0005: 0005-Detect-the-presence-of-rpm-sign-when-checking-for-rh.patch +Patch0007: 0007-Fix-only-pesign-client-without-all-source-renew.patch diff --git a/SPECS/pesign.spec b/SPECS/pesign.spec index 423cd11..ad51ad5 100644 --- a/SPECS/pesign.spec +++ b/SPECS/pesign.spec @@ -3,7 +3,7 @@ Name: pesign Summary: Signing utility for UEFI binaries Version: 115 -Release: 4%{?dist} +Release: 4%{?dist}.inferit.1 License: GPL-2.0-only URL: https://github.com/rhboot/pesign @@ -162,6 +162,9 @@ certutil -d %{_sysconfdir}/pki/pesign/ -X -L > /dev/null %{python3_sitelib}/mockbuild/plugins/pesign.* %changelog +* Wed Apr 05 2023 Alexey Berezhok - 115.4.inferit.1 +- Added fix for pesign-client for db unlocking + * Wed Mar 15 2023 MSVSphere Packaging Team - 115-4 - Rebuilt for MSVSphere 9.1.