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:
authorMarzal <2069735+Marzal@users.noreply.github.com>2019-09-20 00:33:19 +0300
committerMarzal <2069735+Marzal@users.noreply.github.com>2019-09-20 00:33:19 +0300
commit42ac40aad6a15c2ae354e8a274723355cb7f26d3 (patch)
tree8eb43b8d2b6cb8c3dc931349627d61e4c126445f /include/tests_authentication
parent6cf0b28f2ccd7b4c04f41e985735bbe68ec2a023 (diff)
Change variable name from FIND to FIND_P so is not reset by Register
Diffstat (limited to 'include/tests_authentication')
-rw-r--r--include/tests_authentication14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/tests_authentication b/include/tests_authentication
index 05f107ae..9838b399 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -742,24 +742,24 @@
case ${LINUX_VERSION} in
"SuSE")
PREQS_MET="YES"
- FIND=$(passwd -a -S 2> /dev/null | ${AWKBINARY} '{ if ($2=="P" && $5=="99999") print $1 }')
+ FIND_P=$(passwd -a -S 2> /dev/null | ${AWKBINARY} '{ if ($2=="P" && $5=="99999") print $1 }')
FIND2=$(passwd -a -S 2> /dev/null | ${AWKBINARY} '{ if ($2=="NP") print $1 }')
;;
*)
PREQS_MET="YES"
- FIND=$(passwd --all --status 2> /dev/null | ${AWKBINARY} '{ if ($2=="P" && $5=="99999") print $1 }')
+ FIND_P=$(passwd --all --status 2> /dev/null | ${AWKBINARY} '{ if ($2=="P" && $5=="99999") print $1 }')
FIND2=$(passwd --all --status 2> /dev/null | ${AWKBINARY} '{ if ($2=="NP") print $1 }')
;;
esac
elif [ ${OS_REDHAT_OR_CLONE} -eq 1 ]; then
PREQS_MET="YES"
- FIND=$(for I in $(${AWKBINARY} -F: '{print $1}' ${ROOTDIR}etc/passwd) ; do passwd -S $I | ${AWKBINARY} '{ if ($2=="PS" && $5=="99999") print $1 }' ; done)
+ FIND_P=$(for I in $(${AWKBINARY} -F: '{print $1}' ${ROOTDIR}etc/passwd) ; do passwd -S $I | ${AWKBINARY} '{ if ($2=="PS" && $5=="99999") print $1 }' ; done)
FIND2=$(for I in $(${AWKBINARY} -F: '{print $1}' ${ROOTDIR}etc/passwd) ; do passwd -S $I | ${AWKBINARY} '{ if ($2=="NP") print $1 }' ; done)
else
LogText "Result: skipping test for this Linux version"
ReportManual "AUTH-9282:01"
PREQS_MET="NO"
- FIND=""
+ FIND_P=""
FIND2=""
fi
else
@@ -771,12 +771,12 @@
Register --test-no AUTH-9282 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Checking password protected account without expire date"
if [ ${SKIPTEST} -eq 0 ]; then
LogText "Test: Checking Linux version and password expire date status"
- if [ -z "${FIND}" ]; then
+ if [ -z "${FIND_P}" ]; then
LogText "Result: all accounts seem to have an expire date"
Display --indent 2 --text "- Accounts without expire date" --result "${STATUS_OK}" --color GREEN
else
- LogText "Result: found one or more accounts with expire date set"
- for I in ${FIND}; do
+ LogText "Result: found one or more accounts without expire date set"
+ for I in ${FIND_P}; do
LogText "Account without expire date: ${I}"
done
Display --indent 2 --text "- Accounts without expire date" --result "${STATUS_SUGGESTION}" --color YELLOW