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
This commit is contained in:
pyllyukko 2017-01-16 13:02:03 +02:00 committed by Michael Boelen
parent 2bf9bc52cc
commit d25dcd09ef
2 changed files with 7 additions and 0 deletions

View File

@ -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}"

View File

@ -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
#
#################################################################################