!372 Fix the wrong IMA signature header check

From: @HuaxinLuGitee 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
This commit is contained in:
openeuler-ci-bot 2024-08-20 06:20:52 +00:00 committed by Gitee
commit 4bde5e5745
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 2 deletions

View File

@ -363,7 +363,7 @@ index 0000000..715b8d6
+ return -EACCES;
+
+ /* Check if the signature has already included a header */
+ hdr_exist = (sig_size - sizeof(sig_hdr) % 128) == 0 ? 0 : 1;
+ hdr_exist = (st.st_size - sizeof(sig_hdr)) % 128 == 0 ? 1 : 0;
+ if (!hdr_exist) {
+ ret = fill_pgp_signature_header(te, sig_hdr);
+ if (ret < 0)

View File

@ -1,6 +1,6 @@
Name: rpm
Version: 4.18.2
Release: 10
Release: 11
Summary: RPM Package Manager
License: GPLv2+
URL: http://www.rpm.org/
@ -337,6 +337,9 @@ make clean
%exclude %{_mandir}/man8/rpmspec.8.gz
%changelog
* Tue Aug 20 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-11
- Fix the wrong IMA signature header check
* Mon Aug 19 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-10
- Fix the judgement of digests count