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:
authorSiemKorteweg <Siem.Korteweg@qnh.nl>2015-10-06 21:02:33 +0300
committerSiemKorteweg <Siem.Korteweg@qnh.nl>2015-10-06 21:02:33 +0300
commitb7d24c3413307620fc6e7531ed838a119128631d (patch)
tree251a4d7144f3ed12343f587d0f5101b765e68842 /include/tests_nameservices
parentbf1da50c145e22d672f99b7b1d912508bbed75b5 (diff)
Make sure that the input of "uniq -d" is sorted to avoid that duplicate UID's and hosts entries are missed.
Diffstat (limited to 'include/tests_nameservices')
-rw-r--r--include/tests_nameservices2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_nameservices b/include/tests_nameservices
index 9365c9f6..06aa98c3 100644
--- a/include/tests_nameservices
+++ b/include/tests_nameservices
@@ -588,7 +588,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
logtext "Test: check duplicate line in /etc/hosts"
if [ -f /etc/hosts ]; then
- sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | uniq -d`
+ sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | sort | uniq -d`
if [ "${sFIND}" = "" ]; then
logtext "Result: OK, no duplicate lines found"
Display --indent 4 --text "- Checking /etc/hosts (duplicates)" --result OK --color GREEN