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:
authorMichael Boelen <michael.boelen@cisofy.com>2016-08-13 12:18:34 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-08-13 12:18:34 +0300
commita928d578045d2da899be64438ad5f47a7d6a26cc (patch)
treead5b8b5240add9082a485f78099711d62845bd2e
parent1ae7028982073083658dba7642635eccf1856051 (diff)
Add more details to report
-rw-r--r--include/report11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/report b/include/report
index a2c23ef9..03de8a28 100644
--- a/include/report
+++ b/include/report
@@ -138,12 +138,21 @@
echo " ${YELLOW}Suggestions${NORMAL} (${TOTAL_SUGGESTIONS}):"
echo " ${WHITE}----------------------------${NORMAL}"
for SUGGESTION in ${SSUGGESTIONS}; do
+ SOLUTION=""
SHOWSUGGESTION=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: //' | sed 's/\[details:\(.*\)\] \[solution:\(.*\)\]//' | sed 's/test://'`
ADDLINK=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//'`
DETAILS=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[details://' | sed 's/\]\(.*\)]//'`
+ SUGGESTION_PIECES=$(echo ${SUGGESTION} | sed 's/\[/ [/g')
+ for PIECE in ${SUGGESTION_PIECES}; do
+ if [ -z "${SOLUTION}" ]; then
+ SEARCH=$(echo ${PIECE} | grep "^\[solution:")
+ if [ $? -eq 0 ]; then SOLUTION=$(echo ${SEARCH} | sed 's/!space!/ /g' | sed 's/solution://' | sed 's/text://' | tr -d '[]'); fi
+ fi
+ done
IS_CUSTOM=`echo ${ADDLINK} | grep "^CUST"`
echo " ${YELLOW}*${NORMAL} ${SHOWSUGGESTION}"
- if [ ! "${DETAILS}" = "-" ]; then echo " - Details: ${CYAN}${DETAILS}${NORMAL}"; fi
+ if [ ! "${DETAILS}" = "-" ]; then echo " - Details : ${CYAN}${DETAILS}${NORMAL}"; fi
+ if [ ${SHOW_REPORT_SOLUTION} -eq 1 -a ! "${SOLUTION}" = "-" ]; then echo " - Solution : ${SOLUTION}"; fi
if [ "${IS_CUSTOM}" = "" ]; then
echo " ${GRAY}${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}${NORMAL}"
else