From cf1191174a92ac6a565c8522d5b7d28708d3138f Mon Sep 17 00:00:00 2001 From: Huaxin Lu Date: Wed, 21 Aug 2024 12:02:59 +0800 Subject: [PATCH] Fix the calculation of hdr size --- Add-digest-list-plugin.patch | 2 +- rpm.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Add-digest-list-plugin.patch b/Add-digest-list-plugin.patch index 94e0fe4..6ad84c1 100644 --- a/Add-digest-list-plugin.patch +++ b/Add-digest-list-plugin.patch @@ -363,7 +363,7 @@ index 0000000..715b8d6 + return -EACCES; + + /* Check if the signature has already included a header */ -+ hdr_exist = (st.st_size - sizeof(sig_hdr)) % 128 == 0 ? 1 : 0; ++ hdr_exist = st.st_size % 128 == 0 ? 0 : 1; + if (!hdr_exist) { + ret = fill_pgp_signature_header(te, sig_hdr); + if (ret < 0) diff --git a/rpm.spec b/rpm.spec index 56a0995..9442335 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,6 +1,6 @@ Name: rpm Version: 4.18.2 -Release: 11 +Release: 12 Summary: RPM Package Manager License: GPLv2+ URL: http://www.rpm.org/ @@ -337,6 +337,9 @@ make clean %exclude %{_mandir}/man8/rpmspec.8.gz %changelog +* Thu Aug 22 2024 luhuaxin - 4.18.2-12 +- Fix the calculation of hdr size + * Tue Aug 20 2024 luhuaxin - 4.18.2-11 - Fix the wrong IMA signature header check