diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-16 14:20:30 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-16 14:20:30 +0300 |
commit | fa8bad20db100d95cf089b0b2d897c339327215c (patch) | |
tree | 2f80f2e015d26056cd741137dc4fdd069a6c4c5d /include/tests_mac_frameworks | |
parent | 2777caf6d218aeb40c2ebd8af2564be8201eeff1 (diff) |
Use -n instead of ! -z
Diffstat (limited to 'include/tests_mac_frameworks')
-rw-r--r-- | include/tests_mac_frameworks | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/tests_mac_frameworks b/include/tests_mac_frameworks index 516a501e..14b34e4a 100644 --- a/include/tests_mac_frameworks +++ b/include/tests_mac_frameworks @@ -50,7 +50,7 @@ if [ ${APPARMORFOUND} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no MACF-6208 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check if AppArmor is enabled" if [ ${SKIPTEST} -eq 0 ]; then - if [ ! -z "${AASTATUSBINARY}" ]; then + if [ -n "${AASTATUSBINARY}" ]; then CAN_READ_FILE=0 FILE="/sys/kernel/security/apparmor/profiles" if [ -f ${FILE} ]; then @@ -114,7 +114,7 @@ Register --test-no MACF-6232 --weight L --network NO --category security --description "Check SELINUX presence" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: checking if we have sestatus binary" - if [ ! -z "${SESTATUSBINARY}" ]; then + if [ -n "${SESTATUSBINARY}" ]; then LogText "Result: found sestatus binary (${SESTATUSBINARY})" Display --indent 2 --text "- Checking presence SELinux" --result "${STATUS_FOUND}" --color GREEN else @@ -206,7 +206,7 @@ Register --test-no RBAC-6272 --weight L --network NO --category security --description "Check grsecurity presence" if [ ${SKIPTEST} -eq 0 ]; then # Check Linux kernel configuration - if [ ! -z "${LINUXCONFIGFILE}" -a -f "${LINUXCONFIGFILE}" ]; then + if [ -n "${LINUXCONFIGFILE}" -a -f "${LINUXCONFIGFILE}" ]; then FIND=$(${GREPBINARY} ^CONFIG_GRKERNSEC=y ${LINUXCONFIGFILE}) if [ ! "${FIND}" = "" ]; then LogText "Result: grsecurity available (in kernel config)" |