diff --git a/CHANGELOG.md b/CHANGELOG.md index 0728f8c9..17562153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Lynis Changelog +## Lynis 3.0.2 (not released yet) + +### Added +- Detection of Zorin OS + +### Changed +- KRNL-5830 - Improved reboot test by ignoring known bad values + +--------------------------------------------------------------------------------- + ## Lynis 3.0.1 (2020-10-05) ### Added diff --git a/include/consts b/include/consts index 053147a4..2224057b 100644 --- a/include/consts +++ b/include/consts @@ -58,6 +58,7 @@ ETC_PATHS="/etc /usr/local/etc" APPLICATION_FIREWALL_ACTIVE=0 BINARY_SCAN_FINISHED=0 BLKIDBINARY="" + BOOTCTLBINARY="" CAT_BINARY="" CFAGENTBINARY="" CHECK=0 diff --git a/include/osdetection b/include/osdetection index 66592a8f..107ee28f 100644 --- a/include/osdetection +++ b/include/osdetection @@ -261,6 +261,12 @@ OS_FULLNAME="${OS_NAME} ${OS_VERSION_FULL}" OS_REDHAT_OR_CLONE=1 ;; + "rosa") + LINUX_VERSION="ROSA Linux" + OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_NAME="ROSA Linux" + ;; "slackware") LINUX_VERSION="Slackware" OS_NAME="Slackware Linux" @@ -273,11 +279,11 @@ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') OS_NAME="Ubuntu" ;; - "rosa") - LINUX_VERSION="ROSA Linux" + "zorin") + LINUX_VERSION="Zorin OS" + OS_NAME="Zorin OS" OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') - OS_NAME="ROSA Desktop Fresh R11.1" ;; *) ReportException "OS Detection" "Unknown OS found in /etc/os-release - Please create issue on GitHub project page: ${PROGRAM_SOURCE}" diff --git a/include/tests_kernel b/include/tests_kernel index 011d02c6..7bd11e59 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -680,8 +680,19 @@ elif [ -f "${FOUND_VMLINUZ}" ]; then VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's#^/boot/##' | ${SEDBINARY} 's/^vmlinuz-//') LogText "Result: version derived from file name is '${VERSION_ON_DISK}'" + fi + # Data check: perform reset if we found a version but looks incomplete + # Example: Arch Linux will return only 'linux' as its version after it discovered /boot/vmlinuz-linux + case ${VERSION_ON_DISK} in + "linux" | "linux-lts") + LogText "Result: reset of version (${VERSION_ON_DISK}) as it looks incomplete" + VERSION_ON_DISK="" + ;; + esac + + # If we did not find the version yet, see if we can extract it from the magic data that 'file' returns if [ -z "${VERSION_ON_DISK}" ]; then LogText "Test: checking kernel version on disk" NEXTLINE=0 @@ -697,6 +708,7 @@ done fi + # Last check if we finally got a version or not if [ -z "${VERSION_ON_DISK}" ]; then LogText "Result: could not find the version on disk" ReportException "${TEST_NO}:4" "Could not find the kernel version" diff --git a/lynis b/lynis index 4d5306ff..17cd9e91 100755 --- a/lynis +++ b/lynis @@ -45,8 +45,8 @@ # Version details PROGRAM_RELEASE_DATE="2020-10-05" PROGRAM_RELEASE_TIMESTAMP=1601896929 - PROGRAM_RELEASE_TYPE="release" # pre-release or release - PROGRAM_VERSION="3.0.1" + PROGRAM_RELEASE_TYPE="pre-release" # pre-release or release + PROGRAM_VERSION="3.0.2" # Source, documentation and license PROGRAM_SOURCE="https://github.com/CISOfy/lynis"