Blob Blame History Raw
From 240463f2367111ae718954c8241e69af633a57dc Mon Sep 17 00:00:00 2001
From: Robin Lee <cheeselee@fedoraproject.org>
Date: Wed, 26 Sep 2018 23:48:59 +0800
Subject: [PATCH] Fix stack protector support checking on Linux 4.18+

CONFIG_CC_STACKPROTECTOR renamed to CONFIG_STACKPROTECTOR since 4.18.
---
 checksec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checksec b/checksec
index 4d10f4b..44e5403 100755
--- a/checksec
+++ b/checksec
@@ -680,7 +680,7 @@ kernelcheck() {
   fi
 
   echo_message "  GCC stack protector support:            " "" "" ""
-  if $kconfig | grep -qi 'CONFIG_CC_STACKPROTECTOR=y'; then
+  if $kconfig | grep -qi 'CONFIG_CC_STACKPROTECTOR=y' || $kconfig | grep -qi 'CONFIG_STACKPROTECTOR=y' ; then
     echo_message "\033[32mEnabled\033[m\n" "Enabled," " gcc_stack_protector='yes'" '"gcc_stack_protector":"yes",'
   else
     echo_message "\033[31mDisabled\033[m\n" "Disabled," " gcc_stack_protector='no'" '"gcc_stack_protector":"no",'
-- 
2.19.0