mirror of https://github.com/CISOfy/lynis.git
Long format for od does not exist on BSD
This commit is contained in:
parent
34f306eb0b
commit
4829ae9722
|
@ -35,10 +35,8 @@
|
|||
|
||||
# Show deprecation message for old config entries
|
||||
FOUND=0
|
||||
#DATA=$(egrep "^config:" ${PROFILE} | od --address-radix=none -t a | sed 's/ /!space!/g')
|
||||
#if ! IsEmpty "${DATA}"; then FOUND=1; fi
|
||||
# Items such as 'apache:'
|
||||
DATA=$(egrep "^[a-z-]{1,}:" ${PROFILE} | od --address-radix=none -t a | sed 's/ /!space!/g')
|
||||
# Items such as 'config:' and 'apache:'
|
||||
DATA=$(egrep "^[a-z-]{1,}:" ${PROFILE} | od -An -ta | sed 's/ /!space!/g') # od -An (no file offset), -ta (named character, to be on safe side)
|
||||
if ! IsEmpty "${DATA}"; then FOUND=1; fi
|
||||
|
||||
if [ ${FOUND} -eq 1 ]; then
|
||||
|
@ -49,7 +47,7 @@
|
|||
fi
|
||||
|
||||
# Security check for unexpected and possibly harmful escape characters
|
||||
DATA=$(grep -v '^$\|^ \|^#\|^config:' ${PROFILE} | tr -d '[:alnum:]/\[\]\(\)\-_\|,\.:;= \n\r' | od --address-radix=none -t a | sed 's/ /!space!/g')
|
||||
DATA=$(grep -v '^$\|^ \|^#\|^config:' ${PROFILE} | tr -d '[:alnum:]/\[\]\(\)\-_\|,\.:;= \n\r' | od -An -ta | sed 's/ /!space!/g')
|
||||
if ! IsEmpty "${DATA}"; then
|
||||
DisplayWarning "Your profile '${PROFILE}' contains unexpected characters. See the log file for more information."
|
||||
LogText "Found unexpected or possibly harmful characters in the profile. See output below."
|
||||
|
|
Loading…
Reference in New Issue