Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-09-08 17:13:51 +0400
committermboelen <michael@cisofy.com>2014-09-08 17:13:51 +0400
commit29442cdfcfa44dbfab097114e3d804a7f7623fef (patch)
treee32ad8fc48116de0ce07026b5659d234ea2be599
parentac54b4fe8369c699c5afb9c7893f5be9cb67edd6 (diff)
Changes to allow non-privileged scans
-rwxr-xr-xlynis27
1 files changed, 26 insertions, 1 deletions
diff --git a/lynis b/lynis
index f52e2121..66f79b48 100755
--- a/lynis
+++ b/lynis
@@ -272,6 +272,25 @@
echo " ${PROGRAM_extrainfo}"
echo "################################################################################"
fi
+
+ if [ ${PENTESTINGMODE} -eq 1 ]; then
+ echo "${PURPLE}"
+ echo " #########################################################"
+ echo " # NON-PRIVILEGED mode (e.g. pentesting) #"
+ echo " #########################################################"
+ echo ""
+ echo " Some tests will require root permissions"
+ echo " Logging is disabled (no log and no report)"
+ echo ""
+ echo " Press [ENTER] to continue or [CTRL] + C to break"
+ echo ""
+ echo " #########################################################"
+ echo "${NORMAL}"; echo ""
+ if [ ${NEVERBREAK} -eq 0 ]; then read void; fi
+ fi
+
+
+
#
#################################################################################
#
@@ -320,7 +339,13 @@
fi
# Create new PID file (use work directory if /var/run is not available)
- if [ -d /var/run ]; then PIDFILE="/var/run/lynis.pid"; else PIDFILE="lynis.pid"; fi
+ if [ ${PENTESTINGMODE} -eq 1 ]; then
+ PIDFILE="lynis.pid"
+ elif [ -d /var/run ]; then
+ PIDFILE="/var/run/lynis.pid"
+ else
+ PIDFILE="lynis.pid"
+ fi
OURPID=`echo $$`
echo ${OURPID} > ${PIDFILE}
chmod 600 ${PIDFILE}