mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-04-20 18:08:17 +00:00
base-files: only apply the bbappend if ima distro flag set
When the meta-integrity layer is included but feature ima is not set, we would get the following error when the system startup: qemux86-64 systemd-remount-fs[81]: mount: /sys/kernel/security: mount point does not exist. qemux86-64 systemd-remount-fs[81]: /bin/mount for /sys/kernel/security exited with exit status 32. Rename base-files_%.bbappend to base-files-integrity.inc and add a new bbappend. Make sure this piece of code should be applied only if the ima feature is set. Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Append iversion option for auto types
|
||||
do_install_append() {
|
||||
sed -i 's/\s*auto\s*defaults/&,iversion/' "${D}${sysconfdir}/fstab"
|
||||
echo 'securityfs /sys/kernel/security securityfs defaults 0 0' >> "${D}${sysconfdir}/fstab"
|
||||
}
|
||||
@@ -1,5 +1 @@
|
||||
# Append iversion option for auto types
|
||||
do_install_append() {
|
||||
sed -i 's/\s*auto\s*defaults/&,iversion/' "${D}${sysconfdir}/fstab"
|
||||
echo 'securityfs /sys/kernel/security securityfs defaults 0 0' >> "${D}${sysconfdir}/fstab"
|
||||
}
|
||||
require ${@bb.utils.contains('DISTRO_FEATURES', 'ima', 'base-files-integrity.inc', '', d)}
|
||||
|
||||
Reference in New Issue
Block a user