mirror of https://github.com/CISOfy/lynis.git
Use correct character class
Signed-off-by: Simon Biewald <simon@fam-biewald.de>
This commit is contained in:
parent
e917269d01
commit
8895eccea2
|
@ -70,7 +70,7 @@
|
|||
LogText "Result: hostnamed is defined and not longer than 63 characters"
|
||||
fi
|
||||
# Test valid characters (normally a dot should not be in the name, but we can't be 100% sure we have short name)
|
||||
FIND=$(echo "${HOSTNAME}" | ${TRBINARY} -d '[:alpha:]' | ${TRBINARY} -d '.-')
|
||||
FIND=$(echo "${HOSTNAME}" | ${TRBINARY} -d '[:alnum:]\.\-')
|
||||
if [ -z "${FIND}" ]; then
|
||||
LogText "Result: good, no unexpected characters discovered in hostname"
|
||||
if IsVerbose; then Display --indent 2 --text "- Hostname (allowed characters)" --result "${STATUS_OK}" --color GREEN; fi
|
||||
|
|
Loading…
Reference in New Issue