From c52262567e0796487ae2722653bb45694cbd2519 Mon Sep 17 00:00:00 2001 From: Li Rui Bin Date: Sep 27 2018 01:35:09 +0000 Subject: Fix Linux 4.18 compitability (BZ#1632412) --- diff --git a/0001-Fix-stack-protector-support-checking-on-Linux-4.18.patch b/0001-Fix-stack-protector-support-checking-on-Linux-4.18.patch new file mode 100644 index 0000000..1985b70 --- /dev/null +++ b/0001-Fix-stack-protector-support-checking-on-Linux-4.18.patch @@ -0,0 +1,26 @@ +From 240463f2367111ae718954c8241e69af633a57dc Mon Sep 17 00:00:00 2001 +From: Robin Lee +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 + diff --git a/checksec.spec b/checksec.spec index 466f0ed..62aeab1 100644 --- a/checksec.spec +++ b/checksec.spec @@ -6,13 +6,15 @@ Name: checksec Version: 1.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tool to check system for binary-hardening Group: Development/Tools License: BSD URL: %{giturl} Source0: %{giturl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +# https://github.com/slimm609/checksec.sh/pull/69 +Patch0: 0001-Fix-stack-protector-support-checking-on-Linux-4.18.patch BuildArch: noarch @@ -77,6 +79,9 @@ popd %changelog +* Thu Sep 27 2018 Robin Lee - 1.8.0-2 +- Fix Linux 4.18 compitability (BZ#1632412) + * Sun Sep 23 2018 Robin Lee - 1.8.0-1 - Update to 1.8.0 (BZ#1485319)