X-Git-Url: https://piware.de/gitweb/?a=blobdiff_plain;f=deb-checkssp;h=6eab47c6fc11c33b71034fff46025431accf9824;hb=506bc380965825d7e1981d6c1dd2999f8c14e372;hp=21fe6c158e811b456f4b77f06621024339b499e9;hpb=2cc1d12c55a15f7f3d1bf8a7f212c933325d502c;p=bin.git diff --git a/deb-checkssp b/deb-checkssp index 21fe6c1..6eab47c 100755 --- a/deb-checkssp +++ b/deb-checkssp @@ -6,15 +6,16 @@ D=`mktemp -d` trap "rm -rf $D" 0 1 2 3 11 13 15 -for i; do - rm -rf D/* +[ -f "$1" ] || { + echo "Usage: $0 " + exit 1 +} - 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 +dpkg-deb -x "$1" "$D" +find "$D" -type f | while read f; do + # ignore non-ELF files + readelf -h "$f" > /dev/null 2>&1 || continue + strings "$f" | grep -q __stack_chk_fail || { + echo "$1: ${f#$D} not built with SSP" + } done