mirror of https://github.com/CISOfy/lynis.git
KRB-1010: Silence output when SKIPTEST != 0
Fixes https://github.com/CISOfy/lynis/pull/1456#issuecomment-2113390171
This commit is contained in:
parent
05b15f4209
commit
d60c197e14
|
@ -31,8 +31,8 @@ InsertSection "${SECTION_KERBEROS}"
|
||||||
# Test : KRB-1010
|
# Test : KRB-1010
|
||||||
# Description : Check that Kerberos principals have passwords that expire
|
# Description : Check that Kerberos principals have passwords that expire
|
||||||
Register --test-no KRB-1010 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check that Kerberos principals have passwords that expire"
|
Register --test-no KRB-1010 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check that Kerberos principals have passwords that expire"
|
||||||
FOUND=0
|
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
|
FOUND=0
|
||||||
for I in ${PRINCS}
|
for I in ${PRINCS}
|
||||||
do
|
do
|
||||||
FIND="$(${KADMINLOCALBINARY} getprinc "${I}" | ${GREPBINARY} '^Password expiration date:')"
|
FIND="$(${KADMINLOCALBINARY} getprinc "${I}" | ${GREPBINARY} '^Password expiration date:')"
|
||||||
|
@ -42,12 +42,12 @@ InsertSection "${SECTION_KERBEROS}"
|
||||||
FOUND=1
|
FOUND=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
if [ ${FOUND} -eq 1 ]; then
|
||||||
if [ ${FOUND} -eq 1 ]; then
|
Display --indent 4 --text "- Principals without expiring password" --result "${STATUS_WARNING}" --color RED
|
||||||
Display --indent 4 --text "- Principals without expiring password" --result "${STATUS_WARNING}" --color RED
|
ReportSuggestion "${TEST_NO}" "Make sure all your Kerberos principals have expiring passwords"
|
||||||
ReportSuggestion "${TEST_NO}" "Make sure all your Kerberos principals have expiring passwords"
|
else
|
||||||
else
|
Display --indent 4 --text "- Principals without expiring password" --result "${STATUS_OK}" --color GREEN
|
||||||
Display --indent 4 --text "- Principals without expiring password" --result "${STATUS_OK}" --color GREEN
|
fi
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
Loading…
Reference in New Issue