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:
Diffstat (limited to 'include/tests_kernel_hardening')
-rw-r--r--include/tests_kernel_hardening6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/tests_kernel_hardening b/include/tests_kernel_hardening
index 71ed901e..eba7504d 100644
--- a/include/tests_kernel_hardening
+++ b/include/tests_kernel_hardening
@@ -47,7 +47,7 @@
done
# Scan custom profile
- if [ ! -z "${CUSTOM_PROFILE}" ]; then
+ if [ -n "${CUSTOM_PROFILE}" ]; then
FIND=$(${GREPBINARY} "^config-data=sysctl;" ${CUSTOM_PROFILE} | ${SEDBINARY} 's/ /-space-/g')
for LINE in ${FIND}; do
SYSCTLKEY=$(echo ${LINE} | ${AWKBINARY} -F\; '{ print $2 }')
@@ -57,7 +57,7 @@
fi
# Last, use data from default profile
- if [ ! -z "${DEFAULT_PROFILE}" ]; then
+ if [ -n "${DEFAULT_PROFILE}" ]; then
FIND=$(${GREPBINARY} "^config-data=sysctl;" ${DEFAULT_PROFILE} | ${SEDBINARY} 's/ /-space-/g')
for LINE in ${FIND}; do
SYSCTLKEY=$(echo ${LINE} | ${AWKBINARY} -F\; '{ print $2 }')
@@ -76,7 +76,7 @@
tFINDhp=$(echo ${line} | ${AWKBINARY} -F\; '{ print $4 }' | ${GREPBINARY} "[0-9]")
tFINDdesc=$(echo ${line} | ${AWKBINARY} -F\; '{ print $5 }' | ${SEDBINARY} 's/-space-/ /g')
tFINDcurvalue=$(${SYSCTL_READKEY} ${tFINDkey} 2> /dev/null)
- if [ ! -z "${tFINDcurvalue}" ]; then
+ if [ -n "${tFINDcurvalue}" ]; then
positive_match=0
for value in ${tFINDexpvalue}; do
if [ "${value}" = "${tFINDcurvalue}" ]; then