From 8de806c9a7e6eaf69a7c66c191f5c59a782ee7cc Mon Sep 17 00:00:00 2001 From: David <2069735+Marzal@users.noreply.github.com> Date: Wed, 17 Jul 2019 23:25:40 +0200 Subject: [PATCH 1/2] PRIVILEGED var needs to set in both cases set PRIVILEGED in both cases, because now this variable is set before ". ${INCLUDEDIR}/consts" and needs not to be set in that file in order to not be reset to a default value. Also fix typo: PENTESTINGMODE is set when NO root privileges are used --- lynis | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lynis b/lynis index 35a023ef..992fb3dd 100755 --- a/lynis +++ b/lynis @@ -129,7 +129,8 @@ PRIVILEGED=1 PENTESTINGMODE=0 else - # Set to pentesting mode if scan is with root privileges + PRIVILEGED=0 + # Set to pentesting mode if scan is without root privileges PENTESTINGMODE=1 fi From d1cb74e7d9c8a6e515cbd2760f552fa11485cccb Mon Sep 17 00:00:00 2001 From: David <2069735+Marzal@users.noreply.github.com> Date: Wed, 17 Jul 2019 23:28:51 +0200 Subject: [PATCH 2/2] Delete PRIVILEGED var from this file if PRIVILEGED is set in the file, it will overwrite the value in the main program always to 0. This change depends in the other commit that set the variable in both cases. --- include/consts | 1 - 1 file changed, 1 deletion(-) diff --git a/include/consts b/include/consts index 343567df..6df1ea56 100644 --- a/include/consts +++ b/include/consts @@ -219,7 +219,6 @@ unset LANG POSTGRES_RUNNING=0 PREVIOUS_TEST="No test ID" PREVIOUS_TS=0 - PRIVILEGED=0 PROFILES="" PROFILEVALUE="" PSBINARY="ps"