mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 15:54:09 +02:00
Merge branch 'master' of https://github.com/CISOfy/lynis
This commit is contained in:
commit
0ee45b9b0f
@ -2562,14 +2562,18 @@
|
|||||||
|
|
||||||
GetTimestamp() {
|
GetTimestamp() {
|
||||||
ts=0
|
ts=0
|
||||||
case "${OS}" in
|
# Detect if the implementation of date supports nanoseconds,
|
||||||
"Linux")
|
if [ "${OS}" = "Linux" ]; then
|
||||||
|
current_nanoseconds=$(date "+%N")
|
||||||
|
# Verify if the result of the command is a number
|
||||||
|
if [ -n "$current_nanoseconds" ] && [ "$current_nanoseconds" -eq "$current_nanoseconds" ] 2>/dev/null; then
|
||||||
ts=$(date "+%s%N")
|
ts=$(date "+%s%N")
|
||||||
;;
|
else
|
||||||
*)
|
|
||||||
ts=$(date "+%s")
|
ts=$(date "+%s")
|
||||||
;;
|
fi
|
||||||
esac
|
else
|
||||||
|
ts=$(date "+%s")
|
||||||
|
fi
|
||||||
echo $ts
|
echo $ts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -744,7 +744,7 @@
|
|||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
LogText "Test: Checking locate database"
|
LogText "Test: Checking locate database"
|
||||||
FOUND=0
|
FOUND=0
|
||||||
LOCATE_DBS="${ROOTDIR}var/lib/mlocate/mlocate.db ${ROOTDIR}var/lib/locate/locatedb ${ROOTDIR}var/lib/locatedb ${ROOTDIR}var/lib/slocate/slocate.db ${ROOTDIR}var/cache/locate/locatedb ${ROOTDIR}var/db/locate.database"
|
LOCATE_DBS="${ROOTDIR}var/cache/locate/locatedb ${ROOTDIR}var/db/locate.database ${ROOTDIR}var/lib/locate/locatedb ${ROOTDIR}var/lib/locatedb ${ROOTDIR}var/lib/mlocate/mlocate.db ${ROOTDIR}var/lib/plocate/plocate.db ${ROOTDIR}var/lib/slocate/slocate.db"
|
||||||
for FILE in ${LOCATE_DBS}; do
|
for FILE in ${LOCATE_DBS}; do
|
||||||
if [ -f ${FILE} ]; then
|
if [ -f ${FILE} ]; then
|
||||||
LogText "Result: locate database found (${FILE})"
|
LogText "Result: locate database found (${FILE})"
|
||||||
|
@ -135,7 +135,6 @@
|
|||||||
SSHOPS="AllowTcpForwarding:NO,LOCAL,YES:=\
|
SSHOPS="AllowTcpForwarding:NO,LOCAL,YES:=\
|
||||||
ClientAliveCountMax:2,4,16:<\
|
ClientAliveCountMax:2,4,16:<\
|
||||||
ClientAliveInterval:300,600,900:<\
|
ClientAliveInterval:300,600,900:<\
|
||||||
Compression:NO,,YES:=\
|
|
||||||
FingerprintHash:SHA256,MD5,:=\
|
FingerprintHash:SHA256,MD5,:=\
|
||||||
GatewayPorts:NO,,YES:=\
|
GatewayPorts:NO,,YES:=\
|
||||||
IgnoreRhosts:YES,,NO:=\
|
IgnoreRhosts:YES,,NO:=\
|
||||||
@ -158,12 +157,12 @@
|
|||||||
# OpenSSH had some options removed over time. Based on the version we add some additional options to check
|
# OpenSSH had some options removed over time. Based on the version we add some additional options to check
|
||||||
if [ ${OPENSSHD_VERSION_MAJOR} -lt 7 ]; then
|
if [ ${OPENSSHD_VERSION_MAJOR} -lt 7 ]; then
|
||||||
LogText "Result: added additional options for OpenSSH 6.x and lower"
|
LogText "Result: added additional options for OpenSSH 6.x and lower"
|
||||||
SSHOPS="${SSHOPS} UsePrivilegeSeparation:SANDBOX,YES,NO:= Protocol:2,,1:="
|
SSHOPS="${SSHOPS} Compression:(DELAYED|NO),,YES:= UsePrivilegeSeparation:SANDBOX,YES,NO:= Protocol:2,,1:="
|
||||||
elif [ ${OPENSSHD_VERSION_MAJOR} -eq 7 ]; then
|
elif [ ${OPENSSHD_VERSION_MAJOR} -eq 7 ]; then
|
||||||
# Protocol 1 support removed (OpenSSH 7.4 and later)
|
# Protocol 1 support removed (OpenSSH 7.4 and later)
|
||||||
if [ ${OPENSSHD_VERSION_MINOR} -lt 4 ]; then
|
if [ ${OPENSSHD_VERSION_MINOR} -lt 4 ]; then
|
||||||
LogText "Result: added additional options for OpenSSH < 7.4"
|
LogText "Result: added additional options for OpenSSH < 7.4"
|
||||||
SSHOPS="${SSHOPS} Protocol:2,,1:="
|
SSHOPS="${SSHOPS} Compression:(DELAYED|NO),,YES:= Protocol:2,,1:="
|
||||||
fi
|
fi
|
||||||
# UsePrivilegedSeparation removed (OpenSSH 7.5 and later)
|
# UsePrivilegedSeparation removed (OpenSSH 7.5 and later)
|
||||||
if [ ${OPENSSHD_VERSION_MINOR} -lt 5 ]; then
|
if [ ${OPENSSHD_VERSION_MINOR} -lt 5 ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user