diff options
author | Stefan Berger <stefanb@linux.ibm.com> | 2023-04-28 08:23:12 -0400 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2023-05-06 07:54:09 -0400 |
commit | 292b49342cb47da59525a44227598cf136311e1b (patch) | |
tree | 3f4728ba72bac17e6dfd4e370278e1ab8c643554 | |
parent | f4f7624d2e50e19249e7a2a3798c1120e5183424 (diff) | |
download | meta-security-292b49342cb47da59525a44227598cf136311e1b.tar.gz |
ima: Rename IMA_EVM_POLICY_SYSTEMD to IMA_EVM_POLICY
The IMA policy will be specified using the IMA_EVM_POLICY variable since
systemd will not be involved in loading the policy but the init script will
load it.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-integrity/README.md | 2 | ||||
-rw-r--r-- | meta-integrity/classes/ima-evm-rootfs.bbclass | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/meta-integrity/README.md b/meta-integrity/README.md index eae1c57..816b40d 100644 --- a/meta-integrity/README.md +++ b/meta-integrity/README.md | |||
@@ -187,7 +187,7 @@ IMA policy loading became broken in systemd 2.18. The modified systemd | |||
187 | changes. To activate policy loading via systemd, place a policy file | 187 | changes. To activate policy loading via systemd, place a policy file |
188 | in `/etc/ima/ima-policy`, for example with: | 188 | in `/etc/ima/ima-policy`, for example with: |
189 | 189 | ||
190 | IMA_EVM_POLICY_SYSTEMD = "${INTEGRITY_BASE}/data/ima_policy_simple" | 190 | IMA_EVM_POLICY = "${INTEGRITY_BASE}/data/ima_policy_simple" |
191 | 191 | ||
192 | To check that measuring works, look at `/sys/kernel/security/ima/ascii_runtime_measurements` | 192 | To check that measuring works, look at `/sys/kernel/security/ima/ascii_runtime_measurements` |
193 | 193 | ||
diff --git a/meta-integrity/classes/ima-evm-rootfs.bbclass b/meta-integrity/classes/ima-evm-rootfs.bbclass index 3cb0d07..6902d69 100644 --- a/meta-integrity/classes/ima-evm-rootfs.bbclass +++ b/meta-integrity/classes/ima-evm-rootfs.bbclass | |||
@@ -69,10 +69,10 @@ ima_evm_sign_rootfs () { | |||
69 | find ${IMA_EVM_ROOTFS_HASHED} | xargs -d "\n" --no-run-if-empty --verbose evmctl ima_hash | 69 | find ${IMA_EVM_ROOTFS_HASHED} | xargs -d "\n" --no-run-if-empty --verbose evmctl ima_hash |
70 | 70 | ||
71 | # Optionally install custom policy for loading by systemd. | 71 | # Optionally install custom policy for loading by systemd. |
72 | if [ "${IMA_EVM_POLICY_SYSTEMD}" ]; then | 72 | if [ "${IMA_EVM_POLICY}" ]; then |
73 | install -d ./${sysconfdir}/ima | 73 | install -d ./${sysconfdir}/ima |
74 | rm -f ./${sysconfdir}/ima/ima-policy | 74 | rm -f ./${sysconfdir}/ima/ima-policy |
75 | install "${IMA_EVM_POLICY_SYSTEMD}" ./${sysconfdir}/ima/ima-policy | 75 | install "${IMA_EVM_POLICY}" ./${sysconfdir}/ima/ima-policy |
76 | fi | 76 | fi |
77 | } | 77 | } |
78 | 78 | ||