added stack protection detection for OpenBSD systems
authorMichael Rash <mbr@cipherdyne.org>
Sat, 29 Oct 2011 02:59:52 +0000 (22:59 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Sat, 29 Oct 2011 02:59:52 +0000 (22:59 -0400)
test/hardening-check

index a6ad688..a09e235 100755 (executable)
@@ -97,6 +97,22 @@ do
         fi
     fi
 
+    if echo "$RELOC_REPORT" | grep -q '^__stack_chk_fail$'; then
+        good "$name: yes"
+    else
+        ### for OpenBSD
+        if echo "$RELOC_REPORT" | grep -q '^__stack_smash_handler$'; then
+            good "$name: yes"
+        else
+            msg="$name: no, not found!"
+            if [ "$skip_stackprotector" = "yes" ]; then
+                good "$msg (ignored)"
+            else
+                bad "$msg"
+            fi
+        fi
+    fi
+
     # Fortified
     name=" Fortify Source functions"
     if echo "$RELOC_REPORT" | grep -q '^__.*_chk$'; then