X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=deb-checkssp;h=6eab47c6fc11c33b71034fff46025431accf9824;hp=21fe6c158e811b456f4b77f06621024339b499e9;hb=08cc781298e3bebe234f75b609af914ac65a94a4;hpb=fb58d3e69e1205f2ff040b25064bbc3150d27a5a 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