From 2f70a7ed118787fe679c07ed76133a8da3328ec1 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 05 2019 20:20:31 +0000 Subject: import ima-evm-utils-1.1-5.el8 --- diff --git a/SOURCES/libimaevm-keydesc-import.patch b/SOURCES/libimaevm-keydesc-import.patch new file mode 100644 index 0000000..fb20ebc --- /dev/null +++ b/SOURCES/libimaevm-keydesc-import.patch @@ -0,0 +1,37 @@ +diff --git a/src/libimaevm.c b/src/libimaevm.c +index 6fa0ed4..b6f9b9f 100644 +--- a/src/libimaevm.c ++++ b/src/libimaevm.c +@@ -672,12 +672,11 @@ void calc_keyid_v1(uint8_t *keyid, char *str, const unsigned char *pkey, int len + memcpy(keyid, sha1 + 12, 8); + log_debug("keyid: "); + log_debug_dump(keyid, 8); ++ id = __be64_to_cpup((__be64 *) keyid); ++ sprintf(str, "%llX", (unsigned long long)id); + +- if (params.verbose > LOG_INFO) { +- id = __be64_to_cpup((__be64 *) keyid); +- sprintf(str, "%llX", (unsigned long long)id); ++ if (params.verbose > LOG_INFO) + log_info("keyid-v1: %s\n", str); +- } + } + + void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key) +@@ -694,11 +693,10 @@ void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key) + memcpy(keyid, sha1 + 16, 4); + log_debug("keyid: "); + log_debug_dump(keyid, 4); ++ sprintf(str, "%x", __be32_to_cpup(keyid)); + +- if (params.verbose > LOG_INFO) { +- sprintf(str, "%x", __be32_to_cpup(keyid)); ++ if (params.verbose > LOG_INFO) + log_info("keyid: %s\n", str); +- } + + free(pkey); + } +-- +2.19.1 + diff --git a/SPECS/ima-evm-utils.spec b/SPECS/ima-evm-utils.spec index 161a362..af8917b 100644 --- a/SPECS/ima-evm-utils.spec +++ b/SPECS/ima-evm-utils.spec @@ -1,7 +1,7 @@ Summary: IMA/EVM support utilities Name: ima-evm-utils Version: 1.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Url: http://linux-ima.sourceforge.net/ Source: http://sourceforge.net/projects/linux-ima/files/ima-evm-utils/%{name}-%{version}.tar.gz @@ -10,6 +10,7 @@ BuildRequires: openssl-devel libattr-devel keyutils-libs-devel Patch1: docbook-xsl-path.patch Patch2: covscan-memory-leaks.patch Patch3: annocheck-opt-flag.patch +Patch4: libimaevm-keydesc-import.patch %description The Trusted Computing Group(TCG) run-time Integrity Measurement Architecture @@ -30,6 +31,7 @@ This package provides the header files for %{name} %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build mkdir -p m4 @@ -56,6 +58,9 @@ find %{buildroot}%{_libdir} -type f -name "*.la" -print -delete %{_mandir}/man1/* %changelog +* Thu Mar 28 2019 Bruno E. O. Meneguele - 1.1-5 +- Add patch to correctly handle key description on keyring during importation + * Mon Oct 29 2018 Bruno E. O. Meneguele - 1.1-4 - Solve a single memory leak not handled by the last patch