Unverified Commit a9113aad authored by Andrew Udvare's avatar Andrew Udvare
Browse files

Check journalctl -k for NX protection

Does not require root privileges
Fixes #163 where a machine's dmesg -t output buffer may no longer contain the
"NX protection:" message
parent dcde717e
......@@ -787,8 +787,12 @@ kernelcheck() {
echo_message " NX protection: " "" "" ""
if (command_exists dmesg) && (root_privs); then
if (command_exists journalctl); then
nx_protection=$(journalctl -kb -o cat | grep -Fw NX | head -n 1)
elif (command_exists dmesg) && (root_privs); then
nx_protection=$(dmesg -t 2>/dev/null | grep -Fw NX)
if [ -n "$nx_protection" ]; then
if [[ "x${nx_protection}" == "xNX (Execute Disable) protection: active" ]]; then
echo_message "\033[32mEnabled\033[m\n" "Enabled," " nx_protection='yes'" ', "nx_protection":"yes"'
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