mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-07-16 12:47:00 +00:00
init.ima: Fix the failure when importing the external policy from real rootfs
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
This commit is contained in:
@@ -121,7 +121,9 @@ done
|
|||||||
echo "${IMA_POLICY}" > "$securityfs_dir/ima/policy" && {
|
echo "${IMA_POLICY}" > "$securityfs_dir/ima/policy" && {
|
||||||
# Attempt to load IMA policies from the real rootfs.
|
# Attempt to load IMA policies from the real rootfs.
|
||||||
for policy in ${ROOT_DIR}/etc/ima/ima_policy*; do
|
for policy in ${ROOT_DIR}/etc/ima/ima_policy*; do
|
||||||
echo "$policy" > "$securityfs_dir/ima/policy"
|
if [ -s "$policy" ]; then
|
||||||
|
"${ROOT_DIR}/bin/echo.coreutils" "$policy" > "$securityfs_dir/ima/policy"
|
||||||
|
endif
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user