GithubHelp home page GithubHelp logo

Comments (5)

mboelen avatar mboelen commented on July 24, 2024

Related patch has been applied to improve detection. Can you test? (it should skip and show no longer a related message/suggestion)

from lynis.

mboelen avatar mboelen commented on July 24, 2024

@DocEmmetBrown did the patch work correctly for you?

from lynis.

DocEmmetBrown avatar DocEmmetBrown commented on July 24, 2024

Hi @mboelen , sorry I didn't have time to test the patch yet. I promise I'll do it soon and get back to you ;-)

from lynis.

mboelen avatar mboelen commented on July 24, 2024

Closing the issue, to keep the list clean. If it does not work, please reopen this issue.

from lynis.

arcticlinux avatar arcticlinux commented on July 24, 2024

I'm not sure when I started seeing this message, I'm running Lynis on Ubuntu 18.04 I run the audit system from a cronjob and then grep the lynis-report.dat for suggestion entries.

Performing test ID BOOT-5180 (Check for Linux boot services (Debian style))

suggestion[]=BOOT-5180|Determine runlevel and services at startup|-|-|

The code is different now, but the result is similar. The runlevel returns 'N 5' which results in the "Determine runlevel and services at startup" message.

--- tests_boot_services.orig	2021-04-05 13:07:46.697907005 -0600
+++ tests_boot_services	2021-04-05 13:26:55.320215347 -0600
@@ -724,7 +724,7 @@
         # Runlevel check
         sRUNLEVEL=$(${RUNLEVELBINARY} | ${GREPBINARY} "N [0-9]" | ${AWKBINARY} '{ print $2} ')
         LogText "Result: found runlevel ${sRUNLEVEL}"
-        if [ "${sRUNLEVEL}" = "2" ]; then
+        if [ "${sRUNLEVEL}" = "2" ] || [ "${sRUNLEVEL}" = "5" ]; then
             LogText "Result: performing find in /etc/rc2.d as runlevel 2 is found"
             FIND=$(${FINDBINARY} ${ROOTDIR}etc/rc2.d -type l -print | ${CUTBINARY} -d '/' -f4 | ${SEDBINARY} "s/S[0-9][0-9]//g" | sort)
             if [ -n "${FIND}" ]; then

or:

--- tests_boot_services.orig	2021-04-05 13:07:46.697907005 -0600
+++ tests_boot_services	2021-04-05 13:07:25.322033166 -0600
@@ -724,16 +724,16 @@
         # Runlevel check
         sRUNLEVEL=$(${RUNLEVELBINARY} | ${GREPBINARY} "N [0-9]" | ${AWKBINARY} '{ print $2} ')
         LogText "Result: found runlevel ${sRUNLEVEL}"
-        if [ "${sRUNLEVEL}" = "2" ]; then
-            LogText "Result: performing find in /etc/rc2.d as runlevel 2 is found"
-            FIND=$(${FINDBINARY} ${ROOTDIR}etc/rc2.d -type l -print | ${CUTBINARY} -d '/' -f4 | ${SEDBINARY} "s/S[0-9][0-9]//g" | sort)
+        if [ "${sRUNLEVEL}" = "2" ] || [ "${sRUNLEVEL}" = "5" ]; then
+            LogText "Result: performing find in /etc/rc${sRUNLEVEL}.d as runlevel ${sRUNLEVEL} is found"
+            FIND=$(${FINDBINARY} ${ROOTDIR}etc/rc${sRUNLEVEL}.d -type l -print | ${CUTBINARY} -d '/' -f4 | ${SEDBINARY} "s/S[0-9][0-9]//g" | sort)
             if [ -n "${FIND}" ]; then
                 COUNT=0
                 for SERVICE in ${FIND}; do
-                    LogText "Found service (at boot, runlevel 2): ${SERVICE}"
+                    LogText "Found service (at boot, runlevel ${sRUNLEVEL}): ${SERVICE}"
                     COUNT=$((COUNT + 1))
                 done
-                Display --indent 2 --text "- Check services at startup (rc2.d)" --result "${STATUS_DONE}" --color WHITE
+                Display --indent 2 --text "- Check services at startup (rc${sRUNLEVEL}.d)" --result "${STATUS_DONE}" --color WHITE
                 Display --indent 4 --text "Result: found ${COUNT} services"
                 LogText "Result: found ${COUNT} services"
             fi

from lynis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.