"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/profiles" between
lynis-3.0.1.tar.gz and lynis-3.0.2.tar.gz

About: Lynis is a security and system auditing tool.

profiles  (lynis-3.0.1):profiles  (lynis-3.0.2)
skipping to change at line 38 skipping to change at line 38
DEPRECATED_OPTION="" DEPRECATED_OPTION=""
# #
################################################################################ # ################################################################################ #
# #
for PROFILE in ${PROFILES}; do for PROFILE in ${PROFILES}; do
LogText "Reading profile/configuration ${PROFILE}" LogText "Reading profile/configuration ${PROFILE}"
# Show deprecation message for old config entries such as 'config:' and 'apache:' # Show deprecation message for old config entries such as 'config:' and 'apache:'
FOUND=0 FOUND=0
DATA=$(grep -E "^[a-z-]{1,}:" ${PROFILE} | od -An -ta | sed 's/ /!space! /g') # od -An (no file offset), -ta (named character, to be on safe side) DATA=$(grep -E "^[a-z-]{1,}:" ${PROFILE})
if ! IsEmpty "${DATA}"; then FOUND=1; fi if ! IsEmpty "${DATA}"; then FOUND=1; fi
if [ ${FOUND} -eq 1 ]; then if [ ${FOUND} -eq 1 ]; then
Display --text " " Display --text " "
Display --text "==================================================== ==============================================" Display --text "==================================================== =============================================="
DisplayWarning "Your profile contains old-style configuration entrie s. See log file for more details and how to convert these entries" DisplayWarning "Your profile contains old-style configuration entrie s. See log file for more details and how to convert these entries"
Display --indent 2 --text "* ${RED}ISSUE${NORMAL}" Display --indent 2 --text "* ${RED}ISSUE${NORMAL}"
Display --indent 2 --text "Your profile has one or more lines that a re in an old format (key:value). They need to be converted into the new format ( key=value) or disabled." Display --indent 2 --text "Your profile has one or more lines that a re in an old format (key:value). They need to be converted into the new format ( key=value) or disabled."
Display --text " " Display --text " "
Display --indent 2 --text "* ${GREEN}HOW TO RESOLVE${NORMAL}" Display --indent 2 --text "* ${GREEN}HOW TO RESOLVE${NORMAL}"
Display --indent 2 --text "Use grep to see the relevant matches (gre p -E \"^[a-z-]{1,}:\" custom.prf)" Display --indent 2 --text "Use grep to see the relevant matches (gre p -E \"^[a-z-]{1,}:\" custom.prf)"
Display --text " " Display --text " "
Display --text "==================================================== ==============================================" Display --text "==================================================== =============================================="
Display --text " " Display --text " "
LogText "Insight: Profile '${PROFILE}' contians one or more old-styl e configuration entries" LogText "Insight: Profile '${PROFILE}' contains one or more old-styl e configuration entries"
ReportWarning "GEN-0020" "Your profile contains one or more old-styl e configuration entries" ReportWarning "GEN-0020" "Your profile contains one or more old-styl e configuration entries"
sleep 10 sleep 10
fi fi
# Security check for unexpected and possibly harmful escape characters ( hyphen should be listed as first or last character) # Security check for unexpected and possibly harmful escape characters ( hyphen should be listed as first or last character)
DATA=$(grep -Ev '^$|^ |^#|^config:' "${PROFILE}" | tr -d '[:alnum:]/\[\] \(\)_\|,\.:;= \n\r-' | od -An -ta | sed 's/ /!space!/g') DATA=$(grep -Ev '^$|^ |^#|^config:' "${PROFILE}" | tr -d '[:alnum:]/\[\] \(\)_\|,\.:;= \n\r-')
if ! IsEmpty "${DATA}"; then if ! IsEmpty "${DATA}"; then
DisplayWarning "Your profile '${PROFILE}' contains unexpected charac ters. See the log file for more information." DisplayWarning "Your profile '${PROFILE}' contains unexpected charac ters. See the log file for more information."
LogText "Found unexpected or possibly harmful characters in profile '${PROFILE}'. See which characters matched in the output below and compare them with your profile." LogText "Found unexpected or possibly harmful characters in profile '${PROFILE}'. See which characters matched in the output below and compare them with your profile."
for I in ${DATA}; do for I in $(printf ${DATA} | od -An -ta); do
I=$(echo ${I} | sed 's/!space!/ /g')
LogText "Output: ${I}" LogText "Output: ${I}"
done done
LogText "Suggestion: comment incorrect lines with a '#' and try agai n. Open a GitHub issue if valid characters are blocked" LogText "Suggestion: comment incorrect lines with a '#' and try agai n. Open a GitHub issue if valid characters are blocked"
ExitFatal "unexpected characters in profile. Stopping execution (sec urity measure)" ExitFatal "unexpected characters in profile. Stopping execution (sec urity measure)"
fi fi
# Now parse the profile and filter out unwanted characters # Now parse the profile and filter out unwanted characters
DATA=$(grep -E "^config:|^[a-z-].*=" ${PROFILE} | tr -dc '[:alnum:]/\[\] \(\)_\|,\.:;= \n\r-' | sed 's/ /!space!/g') DATA=$(grep -E "^config:|^[a-z-].*=" ${PROFILE} | tr -dc '[:alnum:]/\[\] \(\)_\|,\.:;= \n\r-' | sed 's/ /!space!/g')
for CONFIGOPTION in ${DATA}; do for CONFIGOPTION in ${DATA}; do
if ContainsString "^config:" "${CONFIGOPTION}"; then if ContainsString "^config:" "${CONFIGOPTION}"; then
 End of changes. 4 change blocks. 
5 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)