[cip-dev][isar-cip-core][PATCH v2 10/12] Integrate cis-hardening into cip-core-image

Quirin Gylstorff <[email protected]>
Newsgroups org.cip-project.lists.cip-dev
Message-ID <[email protected]>
Co-Authored-by: Clara Kowalsky <[email protected]>
Co-Authored-by: Felix Moessbauer <[email protected]>
Co-Authored-by: Christoph Steiger <[email protected]>
Signed-off-by: Quirin Gylstorff <[email protected]>
---
 recipes-core/images/cip-core-image.inc    | 4 ++++
 recipes-kernel/linux/linux-cip-common.inc | 1 +
 2 files changed, 5 insertions(+)

diff --git a/recipes-core/images/cip-core-image.inc b/recipes-core/images/cip-core-image.inc
index f6162cd7..0bcaf094 100644
--- a/recipes-core/images/cip-core-image.inc
+++ b/recipes-core/images/cip-core-image.inc
@@ -10,7 +10,11 @@
 #
 
 inherit image
+inherit_defer ${@'cis-hardening' if bb.utils.to_boolean(d.getVar('CIP_CIS_HARDENING')) else ''}
+inherit_defer ${@'cis-kernel-hardening-validation' if bb.utils.to_boolean(d.getVar('CIP_CIS_HARDENING_VALIDATION')) else ''}
 
 IMAGE_INSTALL:append:factory-reset = "factory-reset-helper"
+IMAGE_INSTALL:append = "${@' cip-cis-rules-config-${MACHINE}' if bb.utils.to_boolean(d.getVar('CIP_CIS_HARDENING')) else ''}"
+IMAGE_INSTALL:append = "${@' cis-validation' if bb.utils.to_boolean(d.getVar('CIP_CIS_HARDENING_VALIDATION')) else ''}"
 
 ISAR_RELEASE_CMD = "git -C ${LAYERDIR_cip-core} describe --tags --dirty --always --match 'v[0-9].[0-9]*'"
diff --git a/recipes-kernel/linux/linux-cip-common.inc b/recipes-kernel/linux/linux-cip-common.inc
index 65335238..25197910 100644
--- a/recipes-kernel/linux/linux-cip-common.inc
+++ b/recipes-kernel/linux/linux-cip-common.inc
@@ -16,6 +16,7 @@ inherit linux-kernel
 MAINTAINER = "cip-dev <[email protected]>"
 
 require recipes-kernel/linux/cip-kernel-config.inc
+require recipes-kernel/linux/kernel-hardening.inc
 
 KERNEL_CONFIG_FRAGMENTS:append = "${@(' ' + d.getVar('RT_FRAGMENT')) if d.getVar('KERNEL_NAME') == 'cip-rt' else ''}"
 
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.