Unverified Commit b4db648b authored by slimm609's avatar slimm609 Committed by GitHub
Browse files

Merge pull request #155 from cgzones/fifo

Pass protected_fifos and _regular checks on non-supporting kernels
parents dd839a25 c7c020cf
......@@ -810,16 +810,20 @@ kernelcheck() {
fi
echo_message " Protected fifos: " "" "" ""
symlink=$(sysctl -b -e fs.protected_fifos)
if [[ "x${symlink}" == "x2" ]]; then
fifos=$(sysctl -b -e fs.protected_fifos)
if [[ "x${fifos}" == "x" ]]; then
echo_message "\033[33mUnsupported\033[m\n" "Unsupported," " protect_fifos='unsupported'" ', "protect_fifos":"unsupported"'
elif [[ "x${fifos}" == "x2" ]]; then
echo_message "\033[32mEnabled\033[m\n" "Enabled," " protect_fifos='yes'" ', "protect_fifos":"yes"'
else
echo_message "\033[31mDisabled\033[m\n" "Disabled," " protect_fifos='no'" ', "protect_fifos":"no"'
fi
echo_message " Protected regular: " "" "" ""
hardlink=$(sysctl -b -e fs.protected_regular)
if [[ "x${hardlink}" == "x2" ]]; then
regular=$(sysctl -b -e fs.protected_regular)
if [[ "x${regular}" == "x" ]]; then
echo_message "\033[33mUnsupported\033[m\n" "Unsupported," " protect_regular='unsupported'" ', "protect_regular":"unsupported"'
elif [[ "x${regular}" == "x2" ]]; then
echo_message "\033[32mEnabled\033[m\n" "Enabled," " protect_regular='yes'" ', "protect_regular":"yes"'
else
echo_message "\033[31mDisabled\033[m\n" "Disabled," " protect_regular='no'" ', "protect_regular":"no"'
......@@ -2025,7 +2029,6 @@ elif [[ "${OPT}" != 1 ]]; then
fi
for variable in CHK_DIR CHK_FILE CHK_FORTIFY_FILE CHK_FORTIFY_PROC CHK_PROC CHK_PROC_LIBS; do
chk_name="${variable#*_}"
if [[ -n ${!variable+x} ]]; then
if [[ -z "${!variable}" ]]; then
printf "\033[31mError: Option Required.\033[m\n\n"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment