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>2015-08-20 19:46:06 +0300
committermboelen <michael@cisofy.com>2015-08-20 19:46:06 +0300
commit210ba41a3c2c43041fa4ba40e9e0b0676052a2b8 (patch)
treee9951820dba3a887b333b275feb112dbbdb6807e /include/tests_authentication
parent649f0cfb3c1c1bff7976a11c86a069ffd097d35a (diff)
Improved umask detection and logging
Diffstat (limited to 'include/tests_authentication')
-rw-r--r--include/tests_authentication10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/tests_authentication b/include/tests_authentication
index b00ef5ad..d4e9463b 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -813,7 +813,9 @@
#FIND2=`egrep "^([[:space:]])([[:tab:]])*umask" /etc/profile | awk '{ print $2 }' | wc -l`
WEAK_UMASK=0
FOUND_UMASK=0
- if [ "${FIND2}" = "1" ]; then
+ if [ "${FIND2}" = "0" ]; then
+ logtext "Result: did not find umask in /etc/profile"
+ elif [ "${FIND2}" = "1" ]; then
logtext "Result: found umask (prefixed with spaces)"
FOUND_UMASK=1
if [ ! "${FIND}" = "077" -a ! "${FIND}" = "027" ]; then
@@ -824,7 +826,7 @@
fi
# Found more than 1 umask value in profile
else
- logtext "Result: found several umask values configured in /etc/profile"
+ logtext "Result: found multiple umask values configured in /etc/profile"
FOUND_UMASK=1
for I in ${FIND}; do
if [ ! "${I}" = "077" -a ! "${I}" = "027" ]; then
@@ -861,7 +863,7 @@
logtext "Test: Checking umask entries in /etc/passwd (pam_umask)"
if [ -f /etc/passwd ]; then
logtext "Result: file /etc/passwd exists"
- logtext "Test: Checking umask value in /etc/profile"
+ logtext "Test: Checking umask value in /etc/passwd"
FIND=`grep "umask=" /etc/passwd`
if [ "${FIND}" = "" ]; then
ReportManual "AUTH-9328:03"
@@ -873,7 +875,7 @@
# /etc/login.defs
logtext "Test: Checking /etc/login.defs"
if [ -f /etc/login.defs ]; then
- logtext "Result: file /etc/profile exists"
+ logtext "Result: file /etc/login.defs exists"
logtext "Test: Checking umask value in /etc/login.defs"
FIND=`grep "^UMASK" /etc/login.defs | awk '{ print $2 }'`
if [ "${FIND}" = "" ]; then