You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The test, MACF-6234 (Check SELINUX status) has dependencies on more binaries than are checked by the pre-requisites check. Specifically, the variable ${SEMANAGEBINARY} is used to build a command-line at https://github.com/CISOfy/lynis/blob/master/include/tests_mac_frameworks#L161, but it is not checked that this binary exists first. The only variable tested is ${SESTATUSBINARY} (which is also used in the test).
Version
Distribution [e.g. Ubuntu 18.04]: CentOS 7
Lynis version [e.g. 2.7.0]: 3.0.8 / 1.el7
Expected behavior
Tests requiring ${SEMANAGEBINARY} should be skipped. Either the guard/pre-reqs code for this test should be updated to something like...
...or the test performed by ${SEMANAGEBINARY} should be split out from MACF-6234 and should have its own pre-req around HasData "${SEMANAGEBINARY}".
Output
/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
Additional context
Technically, this test also relies on ${GREPBINARY}, ${AWKBINARY}, ${TRBINARY}, ${WCBINARY} and ${PSBINARY}, but I assume these will be POSIX-compliant, so more widely available, and less-likely to be a concern.
The text was updated successfully, but these errors were encountered:
Describe the bug
The test, MACF-6234 (Check SELINUX status) has dependencies on more binaries than are checked by the pre-requisites check. Specifically, the variable
${SEMANAGEBINARY}
is used to build a command-line at https://github.com/CISOfy/lynis/blob/master/include/tests_mac_frameworks#L161, but it is not checked that this binary exists first. The only variable tested is${SESTATUSBINARY}
(which is also used in the test).Version
Expected behavior
Tests requiring
${SEMANAGEBINARY}
should be skipped. Either the guard/pre-reqs code for this test should be updated to something like......or the test performed by
${SEMANAGEBINARY}
should be split out from MACF-6234 and should have its own pre-req aroundHasData "${SEMANAGEBINARY}"
.Output
Additional context
Technically, this test also relies on
${GREPBINARY}
,${AWKBINARY}
,${TRBINARY}
,${WCBINARY}
and${PSBINARY}
, but I assume these will be POSIX-compliant, so more widely available, and less-likely to be a concern.The text was updated successfully, but these errors were encountered: