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>2017-01-24 21:28:06 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-01-24 21:28:06 +0300
commitd2a80ed789dfbff0f352def8316bfbb9ba0d9cd9 (patch)
tree0ccd98d0b3823ea2b133a2db5ac0cff25c562286
parent145e1164be222d024b5d806dcb6c4cf015a4c2ad (diff)
Add stderr for NETW-3004
-rw-r--r--include/tests_networking14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/tests_networking b/include/tests_networking
index bb50b497..e9b404a4 100644
--- a/include/tests_networking
+++ b/include/tests_networking
@@ -212,27 +212,27 @@
#################################################################################
#
# Test : NETW-3004
- # Description : Find available network interfaces on FreeBSD and others
- Register --test-no NETW-3004 --weight L --network NO --category security --description "Search available network interfaces"
+ # Description : Find available network interfaces
+ Register --test-no NETW-3004 --weight L --network NO --category security --description "Search for available network interfaces"
if [ ${SKIPTEST} -eq 0 ]; then
FIND=""
N=0
case ${OS} in
AIX)
- FIND=`${IFCONFIGBINARY} -a | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ":" '{ print $1 }'`
+ FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ":" '{ print $1 }')
;;
Linux)
if [ ! "${IPBINARY}" = "" ]; then
- FIND=`${IPBINARY} link show | ${GREPBINARY} "^[0-9]" | ${AWKBINARY} '{ print $2 }' | ${SEDBINARY} 's/://g'`
+ FIND=$(${IPBINARY} link show 2> /dev/null | ${GREPBINARY} "^[0-9]" | ${AWKBINARY} '{ print $2 }' | ${SEDBINARY} 's/://g')
elif [ ! "${IFCONFIGBINARY}" = "" ]; then
- FIND=`${IFCONFIGBINARY} -a | ${AWKBINARY} '{ if ( $2 == "Link" ) { print $1 }}'`
+ FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${AWKBINARY} '{ if ( $2 == "Link" ) { print $1 }}')
fi
;;
DragonFly|FreeBSD|macOS|NetBSD)
- FIND=`${IFCONFIGBINARY} -l`
+ FIND=$(${IFCONFIGBINARY} -l 2> /dev/null)
;;
OpenBSD|Solaris)
- FIND=`${IFCONFIGBINARY} -a | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ": " '{ print $1 }'`
+ FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ": " '{ print $1 }')
;;
*)
# Having a system currently unsupported? Share your details to determine network interfaces