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>2020-11-09 16:12:39 +0300
committerGitHub <noreply@github.com>2020-11-09 16:12:39 +0300
commit37631b045725e513fa70ad12a0e15eef1b2ec8ab (patch)
treed74517a3151921dd4b9481813576a69c6417c734 /include/tests_networking
parentf0b7f9159d2eaf114deed058cbe531041f236e01 (diff)
parent8895eccea268860619efa36484137b17d218e555 (diff)
Merge pull request #1061 from Varbin/solaris-hostname
Simplify tr hostname checking expression
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 9657a841..9e63088b 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 '[: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