mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-29 16:54:26 +02:00
tests_mac_frameworks: check for existance of semanage binary. It's not
installed everywhere, causing this error message: /usr/share/lynis/include/tests_mac_frameworks: line 161: permissive: command not found /usr/share/lynis/include/tests_mac_frameworks: line 162: permissive: command not found
This commit is contained in:
parent
59a3c4b536
commit
349975103f
@ -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}"
|
||||||
PERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${TRBINARY} '\n' ' ')
|
if [ -x "$SEMANAGEBINARY" ]; then
|
||||||
NPERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${WCBINARY} -l)
|
PERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${TRBINARY} '\n' ' ')
|
||||||
Display --indent 8 --text "Found ${NPERMISSIVE} permissive SELinux object types"
|
NPERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${WCBINARY} -l)
|
||||||
LogText "Permissive SELinux object types: ${PERMISSIVE}"
|
Display --indent 8 --text "Found ${NPERMISSIVE} permissive SELinux object types"
|
||||||
|
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…
x
Reference in New Issue
Block a user