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
path: root/lynis
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2016-03-16 22:29:05 +0300
committermboelen <michael@cisofy.com>2016-03-16 22:29:05 +0300
commitaf3120209183845981617cf574ec1cb5d62a2abf (patch)
tree45efe430adf57ed945d81953e2b937d7fd02c43c /lynis
parent69c381611529c1ba1eb10df368fe5f6883d11862 (diff)
Show permission warning while allowing users to continue
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis21
1 files changed, 11 insertions, 10 deletions
diff --git a/lynis b/lynis
index 7cc8c06c..aa7f195d 100755
--- a/lynis
+++ b/lynis
@@ -137,37 +137,38 @@
echo "[!] Change ownership of ${INCLUDEDIR}/${FILE} to 'root' or similar (found: ${OWNER} with UID ${OWNERID})."
echo ""
echo " Command:"
- echo " # chown root:root ${INCLUDEDIR}/${FILE}"
+ echo " # chown 0:0 ${INCLUDEDIR}/${FILE}"
echo ""
- echo " Note: on some systems the default group might be 'wheel'. Use 'chown root:wheel' instead on the files."
echo ""
fi
- if [ ${ISSUE} -eq 0 ]; then
- . ${INCLUDEDIR}/consts
- . ${INCLUDEDIR}/functions
- else
+ # Now if there is an issue with permissions, show it to the user and let them decide how to continue.
+ if [ ${ISSUE} -eq 1 ]; then
echo ""; echo "";
echo "[X] Security check failed: See action above, to correct this issue."
echo ""
echo " Why do I see this error?"
echo " -------------------------------"
- echo " This is a protection mechanism, to prevent the root user from executing user created files."
+ echo " This is a protection mechanism to prevent the root user from executing user created files."
echo ""; echo ""
echo " What can I do?"
echo " ---------------------"
- echo " 1) Check if a trusted user created the files (e.g. you, by using Git, Homebrew or similar)"
+ echo " 1) Check if a trusted user created the files, by using Git, Homebrew or similar"
echo ""
echo " 2) Change ownership and permissions of the related files (or full directory)."
echo ""
echo " Commands (full directory):"
echo " # cd .."
- echo " # chown -R root:<GROUP TO WHICH ROOT BELONGS> lynis"
+ echo " # chown -R 0:0 lynis"
echo ""
echo " 3) Start Lynis again (cd lynis && ./lynis)."
echo ""; echo "";
- exit 1
+ echo "[ Press ENTER to continue, or CTRL+C to cancel ]"
+ read DUMMY
fi
+ . ${INCLUDEDIR}/consts
+ . ${INCLUDEDIR}/functions
+
#
#################################################################################
#