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-11-15 01:54:43 +0300
committerSimon Biewald <simon@fam-biewald.de>2020-11-15 01:56:42 +0300
commit73f39baca8a0a82b2a5a6adcd61b4234470ee242 (patch)
tree43db9f3f2a27496ee96d28701014dee3bd509075 /include/functions
parent22a9fe703755bd83a9b4363b1ccc06c93e06148c (diff)
Use first e1000 interface and break after match
Fixes CISOfy/lynis#1075. Before this commit, the interfaces "e1000g1" and "net0" were allowed. The name "e1000g0" is appended to the list. After finding an interface, the loop is interrupted now. As previously "net0" was always used, even if another interface was available, the list is reordered to "net0 e1000g1 e1000g0" to not break previous generations. A typo is also fixed ("No interface found op Solaris ..." -> "No interface found on"). Signed-off-by: Simon Biewald <simon@fam-biewald.de>
Diffstat (limited to 'include/functions')
-rw-r--r--include/functions5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/functions b/include/functions
index b72e7156..c88674ba 100644
--- a/include/functions
+++ b/include/functions
@@ -1089,12 +1089,13 @@
;;
"Solaris")
- INTERFACES_TO_TEST="e1000g1 net0"
+ INTERFACES_TO_TEST="net0 e1000g1 e1000g0"
FOUND=0
for I in ${INTERFACES_TO_TEST}; do
FIND=$(${IFCONFIGBINARY} -a | grep "^${I}")
if [ ! "${FIND}" = "" ]; then
FOUND=1; LogText "Found interface ${I} on Solaris"
+ break
fi
done
if [ ${FOUND} -eq 1 ]; then
@@ -1107,7 +1108,7 @@
ReportException "GetHostID" "Can not find sha1/sha1sum or openssl"
fi
else
- ReportException "GetHostID" "No interface found op Solaris to create HostID"
+ ReportException "GetHostID" "No interface found on Solaris to create HostID"
fi
;;