From: martin@piware.de <> Date: Wed, 6 Sep 2006 10:19:30 +0000 (+0200) Subject: add deb-checkssp X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=commitdiff_plain;h=2cc1d12c55a15f7f3d1bf8a7f212c933325d502c add 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