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>2019-08-04 20:37:55 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-08-04 20:37:55 +0300
commit48ba463376971ebc44822a7a5cc96a9c31c0c996 (patch)
tree012c1730d1b2d02b31b45d7dac35f81ccafdeebb
parent04d2cb838be35cf744e74c6729f6c287000f114f (diff)
Added support for swupd (Clear Linux OS)
-rw-r--r--include/binaries1
-rw-r--r--include/consts1
-rw-r--r--include/functions3
3 files changed, 5 insertions, 0 deletions
diff --git a/include/binaries b/include/binaries
index 5812003f..4c67eb75 100644
--- a/include/binaries
+++ b/include/binaries
@@ -250,6 +250,7 @@
sha256|sha256sum) SHA256SUMBINARY="${BINARY}"; LogText " Found known binary: sha256/sha256sum (crypto hashing) - ${BINARY}" ;;
ssh-keyscan) SSHKEYSCANBINARY="${BINARY}"; LogText " Found known binary: ssh-keyscan (scanner for SSH keys) - ${BINARY}" ;;
suricata) SURICATABINARY="${BINARY}"; LogText " Found known binary: suricata (IDS) - ${BINARY}" ;;
+ swupd) SWUPDBINARY="${BINARY}"; LogText " Found known binary: swupd (package manager) - ${BINARY}" ;;
sysctl) SYSCTLBINARY="${BINARY}"; LogText " Found known binary: sysctl (kernel parameters) - ${BINARY}" ;;
syslog-ng) SYSLOGNGBINARY="${BINARY}"; SYSLOGNGVERSION=$(${BINARY} -V 2>&1 | grep "^syslog-ng" | awk '{ print $2 }'); LogText "Found ${BINARY} (version ${SYSLOGNGVERSION})" ;;
systemctl) SYSTEMCTLBINARY="${BINARY}"; LogText " Found known binary: systemctl (client to systemd) - ${BINARY}" ;;
diff --git a/include/consts b/include/consts
index ae7df4ee..8e98a833 100644
--- a/include/consts
+++ b/include/consts
@@ -276,6 +276,7 @@ unset LANG
SSL_CERTIFICATE_PATHS=""
SSL_CERTIFICATE_PATHS_TO_IGNORE=""
STUNNELBINARY=""
+ SWUPDBINARY=""
SYSLOGNGBINARY=""
SYSTEMCTLBINARY=""
SYSTEM_IS_NOTEBOOK=255
diff --git a/include/functions b/include/functions
index 00c0b30d..74dc33fb 100644
--- a/include/functions
+++ b/include/functions
@@ -1902,6 +1902,9 @@
elif [ -n "${RPMBINARY}" ]; then
output=$(${RPMBINARY} --quiet -q ${package} > /dev/null 2>&1)
exit_code=$?
+ elif [ -n "${SWUPDBINARY}" ]; then
+ output=$(${SWUPDBINARY bundle-list > /dev/null 2>&1 | ${GREPBINARY} "^${package}$")
+ exit_code=$?
elif [ -n "${ZYPPERBINARY}" ]; then
output=$(${ZYPPERBINARY} --quiet --non-interactive search --installed -i ${PACKAGE} 2> /dev/null | grep "^i")
if [ -n "${output}" ]; then exit_code=0; else exit_code=1; fi