mirror of https://github.com/CISOfy/lynis.git
Merge pull request #1373 from jsegitz/tests_mac_frameworks2
tests_mac_frameworks: check for existance of semanage binary
This commit is contained in:
commit
2cb1f4351f
|
@ -158,10 +158,14 @@
|
||||||
Display --indent 6 --text "- Checking current mode and config file" --result "${STATUS_WARNING}" --color RED
|
Display --indent 6 --text "- Checking current mode and config file" --result "${STATUS_WARNING}" --color RED
|
||||||
fi
|
fi
|
||||||
Display --indent 8 --text "Current SELinux mode: ${FIND}"
|
Display --indent 8 --text "Current SELinux mode: ${FIND}"
|
||||||
|
if [ -n "${SEMANAGEBINARY}" ]; then
|
||||||
PERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${TRBINARY} '\n' ' ')
|
PERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${TRBINARY} '\n' ' ')
|
||||||
NPERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${WCBINARY} -l)
|
NPERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${WCBINARY} -l)
|
||||||
Display --indent 8 --text "Found ${NPERMISSIVE} permissive SELinux object types"
|
Display --indent 8 --text "Found ${NPERMISSIVE} permissive SELinux object types"
|
||||||
LogText "Permissive SELinux object types: ${PERMISSIVE}"
|
LogText "Permissive SELinux object types: ${PERMISSIVE}"
|
||||||
|
else
|
||||||
|
LogText "Result: semanage binary NOT found, can't analyse permissive domains"
|
||||||
|
fi
|
||||||
UNCONFINED=$(${PSBINARY} -eo label,pid,command | ${GREPBINARY} '[u]nconfined_t' | ${TRBINARY} '\n' ' ')
|
UNCONFINED=$(${PSBINARY} -eo label,pid,command | ${GREPBINARY} '[u]nconfined_t' | ${TRBINARY} '\n' ' ')
|
||||||
INITRC=$(${PSBINARY} -eo label,pid,command | ${GREPBINARY} '[i]nitrc_t' | ${TRBINARY} '\n' ' ')
|
INITRC=$(${PSBINARY} -eo label,pid,command | ${GREPBINARY} '[i]nitrc_t' | ${TRBINARY} '\n' ' ')
|
||||||
NUNCONFINED=$(${PSBINARY} -eo label | ${GREPBINARY} '[u]nconfined_t' | ${WCBINARY} -l)
|
NUNCONFINED=$(${PSBINARY} -eo label | ${GREPBINARY} '[u]nconfined_t' | ${WCBINARY} -l)
|
||||||
|
|
Loading…
Reference in New Issue