[meta-security][dunfell][PATCH 2/9] initramfs-framework-ima: fix a wrong path


Ming Liu <liu.ming50@...>
 

From: Ming Liu <liu.ming50@gmail.com>

/etc/ima-policy > /etc/ima/ima-policy.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../recipes-core/initrdscripts/initramfs-framework-ima/ima | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-integrity/recipes-core/initrdscripts/initramfs-framewor=
k-ima/ima b/meta-integrity/recipes-core/initrdscripts/initramfs-framework=
-ima/ima
index 8616f99..16ed53f 100644
--- a/meta-integrity/recipes-core/initrdscripts/initramfs-framework-ima/i=
ma
+++ b/meta-integrity/recipes-core/initrdscripts/initramfs-framework-ima/i=
ma
@@ -46,7 +46,7 @@ ima_run() {
# ("[Linux-ima-user] IMA policy loading via cat") and we get better =
error reporting when
# checking the write of each line. To minimize the risk of policy lo=
ading going wrong we
# also remove comments and blank lines ourselves.
- if ! (set -e; while read i; do if echo "$i" | grep -q -e '^#' -e '^ =
*$'; then debug "Skipping IMA policy: $i"; else debug "Writing IMA policy=
: $i"; if echo $i; then sleep ${bootparam_ima_delay:-0}; else fatal "Inva=
lid line in IMA policy: $i"; exit 1; fi; fi; done) </etc/ima-policy >/sys=
/kernel/security/ima/policy; then
+ if ! (set -e; while read i; do if echo "$i" | grep -q -e '^#' -e '^ =
*$'; then debug "Skipping IMA policy: $i"; else debug "Writing IMA policy=
: $i"; if echo $i; then sleep ${bootparam_ima_delay:-0}; else fatal "Inva=
lid line in IMA policy: $i"; exit 1; fi; fi; done) </etc/ima/ima-policy >=
/sys/kernel/security/ima/policy; then
fatal "Could not load IMA policy."
fi
}
--=20
2.29.0

Join yocto@lists.yoctoproject.org to automatically receive all group messages.