Added fix for pesign-client for db unlocking

i9 changed/i9/pesign-115-4.el9.inferit.1
Alexey Berezhok 2 years ago
parent 7c6345b97c
commit f6ec9d4e64

@ -0,0 +1,50 @@
From 833d30c68f4b72ee52f49d3aa3abc700f7f32329 Mon Sep 17 00:00:00 2001
From: Alexey Berezhok <alexey.berezhok@msvsphere.ru>
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

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

@ -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 <alexey.berezhok@msvsphere.ru> - 115.4.inferit.1
- Added fix for pesign-client for db unlocking
* Wed Mar 15 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 115-4
- Rebuilt for MSVSphere 9.1.

Loading…
Cancel
Save