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:
authorSimon Biewald <simon@fam-biewald.de>2020-08-09 03:35:12 +0300
committerSimon Biewald <simon@fam-biewald.de>2020-10-25 23:25:31 +0300
commite917269d011a2c314485a91ca340ea539ed47738 (patch)
treecfd59b0eac500e3dda9486d8a3c21ad7b756207d /include/tests_networking
parent7df0b8618b5cce39961b245a3c582af4294276d7 (diff)
Reduce tr hostname checking expression
Solaris' tr does not support full regular expressions.
Diffstat (limited to 'include/tests_networking')
-rw-r--r--include/tests_networking2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_networking b/include/tests_networking
index 420f26ea..d41132f2 100644
--- a/include/tests_networking
+++ b/include/tests_networking
@@ -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 '[a-zA-Z0-9\.\-]')
+ FIND=$(echo "${HOSTNAME}" | ${TRBINARY} -d '[:alpha:]' | ${TRBINARY} -d '.-')
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