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:
authorBrian Ginsbach <31138029+bginsbach@users.noreply.github.com>2017-09-04 16:33:28 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-09-04 16:33:28 +0300
commit30c58dd1ed7ee7fc3fc348cb78b93ace792c016c (patch)
treefd97b1d1a27f7dc4d4f7620aa7e8df33a4f81f1c
parent8e97fc562506caa906ef496aed9e3a3753796fad (diff)
Don't assume sshd version is in first line (#452)
There are some versions of OpenSSH where the version information isn't in the first line (like NetBSD's with the HPN patches).
-rw-r--r--include/binaries2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/binaries b/include/binaries
index 5f14fdb2..3e295583 100644
--- a/include/binaries
+++ b/include/binaries
@@ -231,7 +231,7 @@
sort) SORTBINARY="${BINARY}"; LogText " Found known binary: sort (sort data streams) - ${BINARY}" ;;
squid) SQUIDFOUND=1; SQUIDBINARY="${BINARY}"; LogText " Found known binary: squid (proxy) - ${BINARY}" ;;
ss) SSFOUND=1; SSBINARY="${BINARY}"; LogText " Found known binary: ss (show sockets) - ${BINARY}" ;;
- sshd) SSHDFOUND=1; SSHDBINARY="${BINARY}"; SSHDVERSION=$(${BINARY} -t -d 2>&1 | head -n 1 | awk '{ print $4 }' | cut -d '_' -f2 | tr -d ',' | tr -d '\r'); LogText "Found ${BINARY} (version ${SSHDVERSION})" ;;
+ sshd) SSHDFOUND=1; SSHDBINARY="${BINARY}"; SSHDVERSION=$(${BINARY} -t -d 2>&1 | grep 'sshd version' | awk '{ print $4 }' | cut -d '_' -f2 | tr -d ',' | tr -d '\r'); LogText "Found ${BINARY} (version ${SSHDVERSION})" ;;
stat) STATFOUND=1; STATBINARY="${BINARY}"; LogText " Found known binary: stat (file information) - ${BINARY}" ;;
strings) STRINGSFOUND=1; STRINGSBINARY="${BINARY}"; LogText " Found known binary: strings (text strings search) - ${BINARY}" ;;
sha1|sha1sum|shasum) SHA1SUMFOUND=1; SHA1SUMBINARY="${BINARY}"; LogText " Found known binary: sha1/sha1sum/shasum (crypto hashing) - ${BINARY}" ;;