From ee7b5f87bb381f1dedd8379124b1b240d906fedf Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 25 Apr 2016 20:04:23 +0200 Subject: [PATCH] [BANN-7119/BANN-7122] Disabled tests --- include/tests_banners | 94 +++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/include/tests_banners b/include/tests_banners index 5aaf6759..07f52c86 100644 --- a/include/tests_banners +++ b/include/tests_banners @@ -65,59 +65,59 @@ # # Test : BANN-7119 # Description : Check MOTD banner file - Register --test-no BANN-7119 --weight L --network NO --description "Check MOTD banner file" - if [ ${SKIPTEST} -eq 0 ]; then - LogText "Test: Testing existence /etc/motd" - if [ -f /etc/motd ]; then - LogText "Result: file /etc/motd exists" - Display --indent 2 --text "- /etc/motd" --result FOUND --color GREEN - if [ ! -L /etc/motd ]; then - if IsWorldWritable /etc/motd; then - Display --indent 4 --text "- /etc/motd permissions" --result WARNING --color RED - LogText "Result: /etc/motd is world writable. Users can change this file!" - ReportWarning ${TEST_NO} "H" "/etc/motd is world writable" - else - Display --indent 4 --text "- /etc/motd permissions" --result OK --color GREEN - LogText "Result: /etc/motd is not world writable." - fi - else - LogText "Result: file /etc/motd is symlink" - fi - else - LogText "Result: File /etc/motd not found" - Display --indent 2 --text "- /etc/motd" --result "NOT FOUND" --color WHITE - fi - fi + #Register --test-no BANN-7119 --weight L --network NO --description "Check MOTD banner file" + #if [ ${SKIPTEST} -eq 0 ]; then + # LogText "Test: Testing existence /etc/motd" + # if [ -f /etc/motd ]; then + # LogText "Result: file /etc/motd exists" + # Display --indent 2 --text "- /etc/motd" --result FOUND --color GREEN + # if [ ! -L /etc/motd ]; then + # if IsWorldWritable /etc/motd; then + # Display --indent 4 --text "- /etc/motd permissions" --result WARNING --color RED + # LogText "Result: /etc/motd is world writable. Users can change this file!" + # ReportWarning ${TEST_NO} "H" "/etc/motd is world writable" + # else + # Display --indent 4 --text "- /etc/motd permissions" --result OK --color GREEN + # LogText "Result: /etc/motd is not world writable." + # fi + # else + # LogText "Result: file /etc/motd is symlink" + # fi + # else + # LogText "Result: File /etc/motd not found" + # Display --indent 2 --text "- /etc/motd" --result "NOT FOUND" --color WHITE + # fi + #fi # ################################################################################# # # Test : BANN-7122 # Description : Check motd file to see if it contains some form of message # to discourage unauthorized users to leave the system alone - if [ -f /etc/motd -a ! -L /etc/motd ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi - Register --test-no BANN-7122 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check /etc/motd banner file contents" - if [ ${SKIPTEST} -eq 0 ]; then - N=0 - LogText "Test: Checking file /etc/motd contents for legal key words" - for I in ${LEGAL_BANNER_STRINGS}; do - FIND=`grep -i "${I}" /etc/motd` - if [ ! "${FIND}" = "" ]; then - LogText "Result: found string '${I}'" - N=`expr ${N} + 1` - fi - done - # Check if we have 5 or more key words - if [ ${N} -gt 4 ]; then - LogText "Result: Found ${N} key words, to warn unauthorized users" - Display --indent 4 --text "- /etc/motd contents" --result OK --color GREEN - AddHP 2 2 - else - LogText "Result: Found only ${N} key words, to warn unauthorized users and could be increased" - Display --indent 4 --text "- /etc/motd contents" --result WEAK --color YELLOW - ReportSuggestion ${TEST_NO} "Add legal banner to /etc/motd, to warn unauthorized users" - AddHP 0 1 - fi - fi + #if [ -f /etc/motd -a ! -L /etc/motd ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi + #Register --test-no BANN-7122 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check /etc/motd banner file contents" + #if [ ${SKIPTEST} -eq 0 ]; then + # N=0 + # LogText "Test: Checking file /etc/motd contents for legal key words" + # for I in ${LEGAL_BANNER_STRINGS}; do + # FIND=`grep -i "${I}" /etc/motd` + # if [ ! "${FIND}" = "" ]; then + # LogText "Result: found string '${I}'" + # N=`expr ${N} + 1` + # fi + # done + # # Check if we have 5 or more key words + # if [ ${N} -gt 4 ]; then + # LogText "Result: Found ${N} key words, to warn unauthorized users" + # Display --indent 4 --text "- /etc/motd contents" --result OK --color GREEN + # AddHP 2 2 + # else + # LogText "Result: Found only ${N} key words, to warn unauthorized users and could be increased" + # Display --indent 4 --text "- /etc/motd contents" --result WEAK --color YELLOW + # ReportSuggestion ${TEST_NO} "Add legal banner to /etc/motd, to warn unauthorized users" + # AddHP 0 1 + # fi + #fi # ################################################################################# #