diff options
author | pyllyukko <pyllyukko@maimed.org> | 2017-01-16 14:02:03 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-01-16 14:02:03 +0300 |
commit | d25dcd09efe52e270be8fe80771cfdc46ef5493d (patch) | |
tree | 327ca9b892aff15f602127d0c440007e246c2ab2 | |
parent | 2bf9bc52ccd7f60086d065aae9e9c0cecff4a53f (diff) |
Set MAC_FRAMEWORK_ACTIVE=1 if grsecurity's RBAC is enabled (#348)
* Look for gradm utility
* Set MAC_FRAMEWORK_ACTIVE=1 if grsec's RBAC is enabled
-rw-r--r-- | include/binaries | 1 | ||||
-rw-r--r-- | include/tests_mac_frameworks | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/binaries b/include/binaries index 7825ed93..503291fb 100644 --- a/include/binaries +++ b/include/binaries @@ -140,6 +140,7 @@ LogText " Found known binary: getent (query tool for name service switch libraries) - ${BINARY}" ;; grep) GREPFOUND=1; GREPBINARY=${BINARY}; LogText " Found known binary: grep (text search) - ${BINARY}" ;; + gradm) GRADMFOUND=1; GRADMBINARY=${BINARY}; LogText " Found known binary: gradm (Grsecurity Administration Utility) - ${BINARY}" ;; grub2-install) GRUB2INSTALLFOUND=1; GRUB2INSTALLBINARY=${BINARY}; LogText " Found known binary: grub2-install (installer for boot loader) - ${BINARY}" ;; gzip) GZIPFOUND=1; GZIPBINARY="${BINARY}"; LogText " Found known binary: gzip (compressing utility) - ${BINARY}" ;; head) HEADBINARY="${BINARY}" diff --git a/include/tests_mac_frameworks b/include/tests_mac_frameworks index e758f8d2..d1bfeeb6 100644 --- a/include/tests_mac_frameworks +++ b/include/tests_mac_frameworks @@ -180,6 +180,12 @@ else Display --indent 2 --text "- Checking presence grsecurity" --result "${STATUS_NOT_FOUND}" --color WHITE fi + if [ ! -z "${GRADMBINARY}" ]; then + FIND=$(${GRADMBINARY} --status) + if [ "${FIND}" = "The RBAC system is currently enabled." ]; then + MAC_FRAMEWORK_ACTIVE=1 + fi + fi fi # ################################################################################# |