Initial commit
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
From 00ace817c5134d9844db387cadb9517ebad43808 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Berger <stefanb@linux.ibm.com>
|
||||
Date: Tue, 18 Apr 2023 11:43:55 -0400
|
||||
Subject: [PATCH] Do not get generation using ioctl when evm_portable is true
|
||||
|
||||
If a signatures is detected as being portable do not attempt to read the
|
||||
generation with the ioctl since in some cases this may not be supported
|
||||
by the filesystem and is also not needed for computing a portable
|
||||
signature.
|
||||
|
||||
This avoids the current work-around of passing --generation 0 when the
|
||||
ioctl is not supported by the filesystem.
|
||||
|
||||
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
src/evmctl.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/evmctl.c b/src/evmctl.c
|
||||
index 6d2bb67..c35a28c 100644
|
||||
--- a/src/evmctl.c
|
||||
+++ b/src/evmctl.c
|
||||
@@ -376,7 +376,7 @@ static int calc_evm_hash(const char *file, unsigned char *hash)
|
||||
if (mode_str)
|
||||
st.st_mode = strtoul(mode_str, NULL, 10);
|
||||
|
||||
- if (!evm_immutable) {
|
||||
+ if (!evm_immutable && !evm_portable) {
|
||||
if (S_ISREG(st.st_mode) && !generation_str) {
|
||||
int fd = open(file, 0);
|
||||
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
2.39.2
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
DESCRIPTION = "IMA/EVM control utility"
|
||||
LICENSE = "GPL-2.0-with-OpenSSL-exception"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
DEPENDS += "openssl attr keyutils"
|
||||
|
||||
DEPENDS:class-native += "openssl-native keyutils-native"
|
||||
|
||||
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI = " \
|
||||
https://github.com/mimizohar/ima-evm-utils/releases/download/v${PV}/${BP}.tar.gz \
|
||||
file://0001-Do-not-get-generation-using-ioctl-when-evm_portable-.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "45f1caa3ad59ec59a1d6a74ea5df38c413488cd952ab62d98cf893c15e6f246d"
|
||||
|
||||
inherit pkgconfig autotools features_check
|
||||
|
||||
REQUIRED_DISTRO_FEATURES = "ima"
|
||||
REQUIRED_DISTRO_FEATURES:class-native = ""
|
||||
|
||||
EXTRA_OECONF += "MANPAGE_DOCBOOK_XSL=0"
|
||||
EXTRA_OECONF:append:class-target = " --with-kernel-headers=${STAGING_KERNEL_BUILDDIR}"
|
||||
|
||||
# blkid is called by evmctl when creating evm checksums.
|
||||
# This is less useful when signing files on the build host,
|
||||
# so disable it when compiling on the host.
|
||||
RDEPENDS:${PN}:append:class-target = " util-linux-blkid libcrypto attr libattr keyutils"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
Reference in New Issue
Block a user