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:
authormboelen <michael@cisofy.com>2014-11-04 02:30:08 +0300
committermboelen <michael@cisofy.com>2014-11-04 02:30:08 +0300
commit28b31b95c801b3e1d3a1986b7135608921804d4d (patch)
tree440e18da60eca1457fb4ecc0694d92d81d4b7a2e /include
parent0a3482b9687e1a0ee8879386aea68d3d3510d702 (diff)
Add OpenBSD support to gather UDP/TCP ports which listen on network
Diffstat (limited to 'include')
-rw-r--r--include/tests_networking10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/tests_networking b/include/tests_networking
index 6cd43c58..cd917c51 100644
--- a/include/tests_networking
+++ b/include/tests_networking
@@ -310,6 +310,16 @@
fi
FIND2=""
;;
+ OpenBSD)
+ if [ ! "${NETSTATBINARY}" = "" ]; then
+ # UDP
+ FIND=`${NETSTATBINARY} -an 2> /dev/null | grep "^udp" | awk '{ print $4"|"$1"||" }'`
+ # TCP
+ FIND2=`${NETSTATBINARY} -an 2> /dev/null | grep "^tcp" | awk '{ if($6=="LISTEN") { print $4"|"$1"||" }}'`
+ else
+ ReportException "${TEST_NO}:3" "netstat missing to gather listening ports"
+ fi
+ ;;
*)
# Got this exception? Provide your details and output of netstat or any other tool to determine this information.
ReportException "${TEST_NO}:2" "Unclear what method to use, to determine listening port information"