summary refs log tree commit diff
path: root/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2019-07-24 21:26:13 +0200
committerRobin Gloster <mail@glob.in>2019-07-24 21:26:13 +0200
commita6ddcd45da2105b1b8b43f92756cbd07db973699 (patch)
treec94f29bb4898c370d763e9e9b8cdb979b8d13a06 /pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
parentdac6a1755890f699384df2d705ff414b3a6478a4 (diff)
downloadnixpkgs-a6ddcd45da2105b1b8b43f92756cbd07db973699.tar
nixpkgs-a6ddcd45da2105b1b8b43f92756cbd07db973699.tar.gz
nixpkgs-a6ddcd45da2105b1b8b43f92756cbd07db973699.tar.bz2
nixpkgs-a6ddcd45da2105b1b8b43f92756cbd07db973699.tar.lz
nixpkgs-a6ddcd45da2105b1b8b43f92756cbd07db973699.tar.xz
nixpkgs-a6ddcd45da2105b1b8b43f92756cbd07db973699.tar.zst
nixpkgs-a6ddcd45da2105b1b8b43f92756cbd07db973699.zip
checksec: 1.5 -> 2.0.1
Diffstat (limited to 'pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch')
-rw-r--r--pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch23
1 files changed, 12 insertions, 11 deletions
diff --git a/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch b/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
index 2caf52f3c0a..9beeab0f954 100644
--- a/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
+++ b/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
@@ -8,20 +8,21 @@ Signed-off-by: Austin Seipp <aseipp@pobox.com>
  checksec.sh | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
-diff --git a/checksec.sh b/checksec.sh
+diff --git a/checksec b/checksec
 index dd1f72e..63acc29 100644
---- a/checksec.sh
-+++ b/checksec.sh
-@@ -337,7 +337,8 @@ kernelcheck() {
-   printf "  userspace processes, this option lists the status of kernel configuration\n"
-   printf "  options that harden the kernel itself against attack.\n\n"
-   printf "  Kernel config: "
-- 
+--- a/checksec
++++ b/checksec
+@@ -676,7 +676,8 @@ kernelcheck() {
+   echo_message "  userspace processes, this option lists the status of kernel configuration\n" '' '' ''
+   echo_message "  options that harden the kernel itself against attack.\n\n" '' '' ''
+   echo_message "  Kernel config:\n" '' '' '{ "kernel": '
+-
 +
 +  modprobe configs 2> /dev/null
-   if [ -f /proc/config.gz ] ; then
-     kconfig="zcat /proc/config.gz"
-     printf "\033[32m/proc/config.gz\033[m\n\n"
+   if [[ ! "${1}" == "" ]] ; then
+     kconfig="cat ${1}"
+     echo_message "  Warning: The config ${1} on disk may not represent running kernel config!\n\n" "${1}" "<kernel config=\"${1}\"" "{ \"KernelConfig\":\"${1}\","
+     # update the architecture based on the config rather than the system
 -- 
 1.8.3.2