mirror of https://github.com/CISOfy/lynis.git
Redirect sysctl error output
This commit is contained in:
parent
215ed82899
commit
c8e17e317d
|
@ -500,6 +500,12 @@
|
|||
fi
|
||||
fi
|
||||
|
||||
# Create host ID when a MAC address was not found
|
||||
#SSH_KEY_FILES="ssh_host_ecdsa_key ssh_host_ecdsa_key.pub ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub"
|
||||
#for I in ${SSH_KEY_FILES}; do
|
||||
#done
|
||||
|
||||
|
||||
}
|
||||
|
||||
# Insert section block
|
||||
|
@ -598,7 +604,7 @@
|
|||
|
||||
# NetBSD: machdep.dmi.system-product
|
||||
# OpenBSD: hw.product
|
||||
SHORT=`sysctl -a | egrep "(hw.product|machdep.dmi.system-product)" | head -1 | sed 's/ = /=/' | awk -F= '{ print $2 }'`
|
||||
SHORT=`sysctl -a | egrep "(hw.product|machdep.dmi.system-product)" 2> /dev/null | head -1 | sed 's/ = /=/' | awk -F= '{ print $2 }'`
|
||||
fi
|
||||
|
||||
# Check if we catched some string along all tests
|
||||
|
@ -777,6 +783,10 @@
|
|||
;;
|
||||
# Headers
|
||||
add_header)
|
||||
HEADER=`echo ${VALUE} | awk '{ print $1 }'`
|
||||
HEADER_VALUE=`echo ${VALUE} | cut -d' ' -f2-`
|
||||
logtext "Result: found header ${HEADER} with value ${HEADER_VALUE}"
|
||||
#report "nginx_header[]=${HEADER}|${HEADER_VALUE}|"
|
||||
;;
|
||||
alias)
|
||||
NGINX_ALIAS_FOUND=1
|
||||
|
@ -859,6 +869,7 @@
|
|||
;;
|
||||
ssl_protocols)
|
||||
NGINX_SSL_PROTOCOLS=1
|
||||
#report "nginx_ssl_protocols=${VALUE}"
|
||||
;;
|
||||
ssl_session_cache)
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue