summaryrefslogtreecommitdiffstats
path: root/package/checksec/0001-checksec-Fixed-issue-with-relative-path.patch
diff options
context:
space:
mode:
authorParesh Chaudhary <paresh.chaudhary@rockwellcollins.com>2018-08-13 20:17:56 -0500
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-08-21 00:21:51 +0200
commitbf61e3725c44fa7da32276df480d411ecfd64f29 (patch)
tree220a29f0d0cfc904cb178852f1c2612820f30f2b /package/checksec/0001-checksec-Fixed-issue-with-relative-path.patch
parentcbb7b49f4c790a26cddca4d826095b86af70446f (diff)
downloadbuildroot-bf61e3725c44fa7da32276df480d411ecfd64f29.tar.gz
buildroot-bf61e3725c44fa7da32276df480d411ecfd64f29.zip
package/checksec: new package
This patch adds host-checksec package support. This tool provides a script to offline check the properties of a security hardened elf file. REF: https://github.com/slimm609/checksec.sh Signed-off-by: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com> Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com> [Thomas: add entry to DEVELOPERS file.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/checksec/0001-checksec-Fixed-issue-with-relative-path.patch')
-rw-r--r--package/checksec/0001-checksec-Fixed-issue-with-relative-path.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/checksec/0001-checksec-Fixed-issue-with-relative-path.patch b/package/checksec/0001-checksec-Fixed-issue-with-relative-path.patch
new file mode 100644
index 0000000000..3ed75a3c34
--- /dev/null
+++ b/package/checksec/0001-checksec-Fixed-issue-with-relative-path.patch
@@ -0,0 +1,43 @@
+From b48a2dfae26fa3b4af8e65fb5953b3caf62c137b Mon Sep 17 00:00:00 2001
+From: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
+Date: Mon, 21 May 2018 14:34:23 -0500
+Subject: [PATCH] checksec: Fixed issue with relative path
+
+Before this patch, the checksec script was not able to find existing
+directories when the user passed a relative path with --dir/-d,
+the script aborted with a "No such file or directory". The same error
+was reported when the script was executed through a relative path.
+
+https://github.com/slimm609/checksec.sh/issues/54
+
+Signed-off-by: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
+Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
+---
+ checksec | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/checksec b/checksec
+index 24b521f..baf8d63 100755
+--- a/checksec
++++ b/checksec
+@@ -1193,7 +1193,7 @@ do
+ echo_message "RELRO STACK CANARY NX PIE RPATH RUNPATH FORTIFY Checked Total Filename\n" '' "<dir name='$tempdir'>\n" "{ \"dir\": { \"name\":\"$tempdir\" },"
+ fdircount=0
+ fdirtotal=0
+- for N in $(find $tempdir -type f); do
++ for N in $(find . -type f); do
+ if [[ "$N" != "[A-Za-z1-0]*" ]]; then
+ out=$(file "$N")
+ if [[ $out =~ ELF ]] ; then
+@@ -1201,7 +1201,7 @@ do
+ fi
+ fi
+ done
+- for N in $(find $tempdir -type f); do
++ for N in $(find . -type f); do
+ if [[ "$N" != "[A-Za-z1-0]*" ]]; then
+ # read permissions?
+ if [[ ! -r "$N" ]]; then
+--
+1.9.1
+
OpenPOWER on IntegriCloud