summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2023-05-03 08:05:07 -0400
committerArmin Kuster <akuster808@gmail.com>2023-05-06 07:54:09 -0400
commita1aadafc7fc7f2fd8ff90eba3bbae724e5fd01c6 (patch)
tree30b0bd22d08d10cd04938bc5b061768b97f721aa
parent10a2c9505cf3571e081e7aeac3c232dcad72f85c (diff)
downloadmeta-security-a1aadafc7fc7f2fd8ff90eba3bbae724e5fd01c6.tar.gz
lynis: Add decoding OE and Poky
Patch sent upstream. Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch51
-rw-r--r--meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb4
2 files changed, 54 insertions, 1 deletions
diff --git a/meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch b/meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch
new file mode 100644
index 0000000..d365ec1
--- /dev/null
+++ b/meta-security-compliance/recipes-auditors/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch
@@ -0,0 +1,51 @@
1From 4b1de197ee0dd259cc05d5faf7fd38b580d841d2 Mon Sep 17 00:00:00 2001
2From: Armin Kuster <akuster808@gmail.com>
3Date: Tue, 2 May 2023 16:22:13 -0400
4Subject: [PATCH] osdetection: add OpenEmbedded and Poky
5
6Signed-off-by: Armin Kuster <akuster@mvista.com>
7
8Upstream-Status: Pending
9https://github.com/CISOfy/lynis/pull/1390
10
11Signed-off-by: Armin Kuster <akuster808@gmail.com>
12
13---
14 include/osdetection | 14 ++++++++++++++
15 1 file changed, 14 insertions(+)
16
17diff --git a/include/osdetection b/include/osdetection
18index 989b1b3..e5974e5 100644
19--- a/include/osdetection
20+++ b/include/osdetection
21@@ -308,6 +308,12 @@
22 OS_REDHAT_OR_CLONE=1
23 OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
24 ;;
25+ "nodistro")
26+ LINUX_VERSION="openembedded"
27+ OS_NAME="OpenEmbedded"
28+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
29+ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
30+ ;;
31 "opensuse-tumbleweed")
32 LINUX_VERSION="openSUSE Tumbleweed"
33 # It's rolling release but has a snapshot version (the date of the snapshot)
34@@ -330,6 +336,14 @@
35 OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
36 OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
37 ;;
38+ "poky")
39+ LINUX_VERSION="Poky"
40+ OS_NAME="openembedded"
41+ LINUX_VERSION_LIKE="openembedded"
42+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
43+ OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
44+
45+ ;;
46 "pop")
47 LINUX_VERSION="Pop!_OS"
48 LINUX_VERSION_LIKE="Ubuntu"
49--
502.25.1
51
diff --git a/meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb b/meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb
index d38c17a..0a49812 100644
--- a/meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb
+++ b/meta-security-compliance/recipes-auditors/lynis/lynis_3.0.8.bb
@@ -6,7 +6,9 @@ HOMEDIR = "https://cisofy.com/"
6LICENSE = "GPL-3.0-only" 6LICENSE = "GPL-3.0-only"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=3edd6782854304fd11da4975ab9799c1" 7LIC_FILES_CHKSUM = "file://LICENSE;md5=3edd6782854304fd11da4975ab9799c1"
8 8
9SRC_URI = "https://cisofy.com/files/${BPN}-${PV}.tar.gz" 9SRC_URI = "https://cisofy.com/files/${BPN}-${PV}.tar.gz \
10 file://0001-osdetection-add-OpenEmbedded-and-Poky.patch \
11 "
10 12
11SRC_URI[sha256sum] = "98373a4cc9d0471ab9bebb249e442fcf94b6bf6d4e9c6fc0b22bca1506646c63" 13SRC_URI[sha256sum] = "98373a4cc9d0471ab9bebb249e442fcf94b6bf6d4e9c6fc0b22bca1506646c63"
12 14