From 2cc1d12c55a15f7f3d1bf8a7f212c933325d502c Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Wed, 6 Sep 2006 12:19:30 +0200 Subject: [PATCH] add deb-checkssp --- deb-checkssp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 deb-checkssp diff --git a/deb-checkssp b/deb-checkssp new file mode 100755 index 0000000..21fe6c1 --- /dev/null +++ b/deb-checkssp @@ -0,0 +1,20 @@ +#!/bin/sh -e + +# check given debs for SSP and print out the deb and filename of non-SSP ELF +# files + +D=`mktemp -d` +trap "rm -rf $D" 0 1 2 3 11 13 15 + +for i; do + rm -rf D/* + + dpkg-deb -x "$i" "$D" + find "$D" -type f | while read f; do + # ignore non-ELF files + readelf -h "$f" > /dev/null 2>&1 || continue + nm -D "$f" | grep -q __stack_chk_fail || { + echo "$i: ${f#$D} not built with SSP" + } + done +done -- 2.39.2